Core/World: Store account id in CharacterInfo to reduce the amount of database queries
(cherry picked from commit aaaa1c34410c160c7b0382f5ecdb39fa01ba007c)
(cherry picked from commit 4a36850167)
Conflicts:
src/server/game/Handlers/CharacterHandler.cpp
src/server/game/World/World.cpp
This commit is contained in:
1 parent
b7d37daa74
commit
ce7fc03930
15 files changed
+91
-104
No files matched your search
@@ -275,14 +275,14 @@ public:
|
||||
|
||||
arena->SetCaptain(targetGuid);
|
||||
|
||||
CharacterNameData const* oldCaptainNameData = sWorld->GetCharacterNameData(arena->GetCaptain());
|
||||
CharacterInfo const* oldCaptainNameData = sWorld->GetCharacterInfo(arena->GetCaptain());
|
||||
if (!oldCaptainNameData)
|
||||
{
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainNameData->m_name.c_str(), target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainNameData->Name.c_str(), target->GetName().c_str());
|
||||
if (handler->GetSession())
|
||||
TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().GetCounter(), target->GetName().c_str(), target->GetGUID().GetCounter(), arena->GetName().c_str(), arena->GetId());
|
||||
|
||||
Reference in new issue
Block a user