Changeset 168 for trunk/src/game/Player.cpp
- Timestamp:
- 11/19/08 13:42:33 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Player.cpp
r149 r168 1353 1353 // always send the flag if declined names aren't used 1354 1354 // to let the client select a default method of declining the name 1355 if(!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) || (result && result->Fetch()[1 2].GetCppString() != ""))1355 if(!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) || (result && result->Fetch()[13].GetCppString() != "")) 1356 1356 char_flags |= CHARACTER_FLAG_DECLINED; 1357 1357 … … 1371 1371 Field* fields = result->Fetch(); 1372 1372 1373 uint32 entry = fields[ 9].GetUInt32();1373 uint32 entry = fields[10].GetUInt32(); 1374 1374 CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(entry); 1375 1375 if(cInfo) 1376 1376 { 1377 petDisplayId = fields[1 0].GetUInt32();1378 petLevel = fields[1 1].GetUInt32();1377 petDisplayId = fields[11].GetUInt32(); 1378 petLevel = fields[12].GetUInt32(); 1379 1379 petFamily = cInfo->family; 1380 1380 } … … 13496 13496 if(!result) 13497 13497 { 13498 // 0 1 2 3 4 5 6 7 813499 result = CharacterDatabase.PQuery("SELECT data, name, position_x, position_y, position_z, map, totaltime, leveltime, at_login FROM characters WHERE guid = '%u'",guid);13498 // 0 1 2 3 4 5 6 7 8 9 13499 result = CharacterDatabase.PQuery("SELECT guid, data, name, position_x, position_y, position_z, map, totaltime, leveltime, at_login FROM characters WHERE guid = '%u'",guid); 13500 13500 if(!result) return false; 13501 13501 } … … 13504 13504 Field *fields = result->Fetch(); 13505 13505 13506 if(!LoadValues( fields[ 0].GetString()))13506 if(!LoadValues( fields[1].GetString())) 13507 13507 { 13508 13508 sLog.outError("ERROR: Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid)); … … 13514 13514 SetUInt64Value(OBJECT_FIELD_GUID, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER)); 13515 13515 13516 m_name = fields[ 1].GetCppString();13517 13518 Relocate(fields[ 2].GetFloat(),fields[3].GetFloat(),fields[4].GetFloat());13519 SetMapId(fields[ 5].GetUInt32());13516 m_name = fields[2].GetCppString(); 13517 13518 Relocate(fields[3].GetFloat(),fields[4].GetFloat(),fields[5].GetFloat()); 13519 SetMapId(fields[6].GetUInt32()); 13520 13520 // the instance id is not needed at character enum 13521 13521 13522 m_Played_time[0] = fields[ 6].GetUInt32();13523 m_Played_time[1] = fields[ 7].GetUInt32();13524 13525 m_atLoginFlags = fields[ 8].GetUInt32();13522 m_Played_time[0] = fields[7].GetUInt32(); 13523 m_Played_time[1] = fields[8].GetUInt32(); 13524 13525 m_atLoginFlags = fields[9].GetUInt32(); 13526 13526 13527 13527 // I don't see these used anywhere ..