Core/Text: Implemented locales_page_text. (#221)
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1062,6 +1062,12 @@ class ObjectMgr
|
|||||||
if (itr == _gameObjectDataStore.end()) return NULL;
|
if (itr == _gameObjectDataStore.end()) return NULL;
|
||||||
return &itr->second;
|
return &itr->second;
|
||||||
}
|
}
|
||||||
|
PageTextLocale const* GetPageTextLocale(uint32 entry) const
|
||||||
|
{
|
||||||
|
PageTextLocaleContainer::const_iterator itr = _pageTextLocaleStore.find(entry);
|
||||||
|
if (itr == _pageTextLocaleStore.end()) return NULL;
|
||||||
|
return &itr->second;
|
||||||
|
}
|
||||||
GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
|
GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
|
||||||
void DeleteGOData(uint32 guid);
|
void DeleteGOData(uint32 guid);
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,14 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data << pageText->Text;
|
std::string Text = pageText->Text;
|
||||||
|
|
||||||
|
int loc_idx = GetSessionDbLocaleIndex();
|
||||||
|
if (loc_idx >= 0)
|
||||||
|
if (PageTextLocale const* player = sObjectMgr->GetPageTextLocale(pageID))
|
||||||
|
ObjectMgr::GetLocaleString(player->Text, loc_idx, Text);
|
||||||
|
|
||||||
|
data << Text;
|
||||||
data << uint32(pageText->NextPage);
|
data << uint32(pageText->NextPage);
|
||||||
pageID = pageText->NextPage;
|
pageID = pageText->NextPage;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user