Core/Misc: Update game object template locale in simple system
(cherry picked from commit f4536f38123c536d90733d047e1072b4dd88e910) Conflicts: src/server/game/Globals/ObjectMgr.cpp src/server/game/Handlers/QueryHandler.cpp
This commit is contained in:
1 parent
f880f2e778
commit
9245bad755
3 files changed
+65
-21
No files matched your search
@@ -174,15 +174,14 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
|
||||
IconName = info->IconName;
|
||||
CastBarCaption = info->castBarCaption;
|
||||
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
if (GameObjectLocale const* gl = sObjectMgr->GetGameObjectLocale(entry))
|
||||
LocaleConstant localeConstant = GetSessionDbLocaleIndex();
|
||||
if (localeConstant >= LOCALE_enUS)
|
||||
if (GameObjectLocale const* gameObjectLocale = sObjectMgr->GetGameObjectLocale(entry))
|
||||
{
|
||||
ObjectMgr::GetLocaleString(gl->Name, loc_idx, Name);
|
||||
ObjectMgr::GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
|
||||
ObjectMgr::GetLocaleString(gameObjectLocale->Name, localeConstant, Name);
|
||||
ObjectMgr::GetLocaleString(gameObjectLocale->CastBarCaption, localeConstant, CastBarCaption);
|
||||
}
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
|
||||
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
|
||||
data << uint32(entry);
|
||||
|
||||
Reference in new issue
Block a user