Core/World: Store account id in CharacterInfo to reduce the amount of database queries

(cherry picked from commit aaaa1c34410c160c7b0382f5ecdb39fa01ba007c)
This commit is contained in:
Shauren committed 2015-10-29 21:08:00 +01:00
1 parent 38c7a37530
commit 4a36850167
14 files changed
+88 -101

No files matched your search

+2 -2
View File
@@ -222,7 +222,7 @@ public:
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_DATA);
stmt->setUInt32(0, delInfo.guid.GetCounter());
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
sWorld->AddCharacterNameData(delInfo.guid, delInfo.name, (*result)[2].GetUInt8(), (*result)[0].GetUInt8(), (*result)[1].GetUInt8(), (*result)[3].GetUInt8());
sWorld->AddCharacterInfo(delInfo.guid, delInfo.accountId, delInfo.name, (*result)[2].GetUInt8(), (*result)[0].GetUInt8(), (*result)[1].GetUInt8(), (*result)[3].GetUInt8());
}
static void HandleCharacterLevel(Player* player, ObjectGuid playerGuid, uint32 oldLevel, uint32 newLevel, ChatHandler* handler)
@@ -382,7 +382,7 @@ public:
CharacterDatabase.Execute(stmt);
}
sWorld->UpdateCharacterNameData(targetGuid, newName);
sWorld->UpdateCharacterInfo(targetGuid, newName);
handler->PSendSysMessage(LANG_RENAME_PLAYER_WITH_NEW_NAME, playerOldName.c_str(), newName.c_str());