mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
Core/Text: Implemented locales_page_text. (#221)
This commit is contained in:
1968
data/sql/updates/pending_db_world/rev_1478151940273037900.sql
Normal file
1968
data/sql/updates/pending_db_world/rev_1478151940273037900.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -1062,6 +1062,12 @@ class ObjectMgr
|
||||
if (itr == _gameObjectDataStore.end()) return NULL;
|
||||
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]; }
|
||||
void DeleteGOData(uint32 guid);
|
||||
|
||||
|
||||
@@ -275,7 +275,14 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
|
||||
}
|
||||
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);
|
||||
pageID = pageText->NextPage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user