Core/Misc: Update game creature template locale in simple system

(cherry picked from commit 8aa55a0b57)
This commit is contained in:
Vincent-Michael
2015-08-01 11:58:14 +02:00
committed by Shauren
parent c911a2aaa9
commit 98cd477149
4 changed files with 66 additions and 17 deletions

View File

@@ -96,9 +96,9 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry);
if (ci)
{
std::string Name, SubName;
std::string Name, Title;
Name = ci->Name;
SubName = ci->SubName;
Title = ci->Title;
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
@@ -106,7 +106,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
if (CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(entry))
{
ObjectMgr::GetLocaleString(cl->Name, loc_idx, Name);
ObjectMgr::GetLocaleString(cl->SubName, loc_idx, SubName);
ObjectMgr::GetLocaleString(cl->Title, loc_idx, Title);
}
}
TC_LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
@@ -115,7 +115,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
data << uint32(entry); // creature entry
data << Name;
data << uint8(0) << uint8(0) << uint8(0); // name2, name3, name4, always empty
data << SubName;
data << Title;
data << ci->IconName; // "Directions" for guard, string for Icons 2.3.0
data << uint32(ci->type_flags); // flags
data << uint32(ci->type); // CreatureType.dbc