diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-07-18 19:58:13 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2015-07-18 19:58:13 +0200 |
commit | f4536f38123c536d90733d047e1072b4dd88e910 (patch) | |
tree | d7bf87863679f79e95e88545459c7452d602c2d8 /src/server/game/Handlers/QueryHandler.cpp | |
parent | 21b11e67fe2e3e630954ac52d3bf04c5cb17e993 (diff) |
Core/Misc: Update game object template locale in simple system
Diffstat (limited to 'src/server/game/Handlers/QueryHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/QueryHandler.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index 5d40165df04..fdbe74fd123 100644 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -126,26 +126,32 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPackets::Query::QueryGameObj response.Allow = true; WorldPackets::Query::GameObjectStats& stats = response.Stats; - stats.CastBarCaption = gameObjectInfo->castBarCaption; + stats.Type = gameObjectInfo->type; stats.DisplayID = gameObjectInfo->displayId; - stats.IconName = gameObjectInfo->IconName; + stats.Name[0] = gameObjectInfo->name; + stats.IconName = gameObjectInfo->IconName; + stats.CastBarCaption = gameObjectInfo->castBarCaption; + stats.UnkString = gameObjectInfo->unk1; - GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(packet.GameObjectID); - if (items) + LocaleConstant localeConstant = GetSessionDbLocaleIndex(); + if (localeConstant >= LOCALE_enUS) + if (GameObjectLocale const* gameObjectLocale = sObjectMgr->GetGameObjectLocale(packet.GameObjectID)) + { + ObjectMgr::GetLocaleString(gameObjectLocale->Name, localeConstant, stats.Name[0]); + ObjectMgr::GetLocaleString(gameObjectLocale->CastBarCaption, localeConstant, stats.CastBarCaption); + ObjectMgr::GetLocaleString(gameObjectLocale->Unk1, localeConstant, stats.UnkString); + } + + stats.Size = gameObjectInfo->size; + + if (GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(packet.GameObjectID)) for (uint32 item : *items) stats.QuestItems.push_back(item); for (uint32 i = 0; i < MAX_GAMEOBJECT_DATA; i++) stats.Data[i] = gameObjectInfo->raw.data[i]; - - stats.Size = gameObjectInfo->size; - stats.Type = gameObjectInfo->type; - stats.UnkString = gameObjectInfo->unk1; - stats.Expansion = 0; } - else - response.Allow = false; SendPacket(response.Write()); } |