Fix localization of gossip menu options

Original patch by Qowyn
Adapted to trinity (and tested) by Durotar and Aokromes

--HG--
branch : trunk
This commit is contained in:
Spp
2010-05-16 00:58:24 +02:00
parent fa57ce4cd1
commit a99c6bd5a9
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -380,7 +380,7 @@ void ObjectMgr::LoadCreatureLocales()
sLog.outString(">> Loaded %lu creature locale strings", (unsigned long)mCreatureLocaleMap.size()); sLog.outString(">> Loaded %lu creature locale strings", (unsigned long)mCreatureLocaleMap.size());
} }
void ObjectMgr::LoadNpcOptionLocales() void ObjectMgr::LoadGossipMenuItemsLocales()
{ {
mGossipMenuItemsLocaleMap.clear(); // need for reload case mGossipMenuItemsLocaleMap.clear(); // need for reload case
@@ -408,7 +408,7 @@ void ObjectMgr::LoadNpcOptionLocales()
for (uint8 i = 1; i < MAX_LOCALE; ++i) for (uint8 i = 1; i < MAX_LOCALE; ++i)
{ {
std::string str = fields[1+2*(i-1)].GetCppString(); std::string str = fields[2+2*(i-1)].GetCppString();
if (!str.empty()) if (!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
@@ -420,7 +420,7 @@ void ObjectMgr::LoadNpcOptionLocales()
data.OptionText[idx] = str; data.OptionText[idx] = str;
} }
} }
str = fields[1+2*(i-1)+1].GetCppString(); str = fields[2+2*(i-1)+1].GetCppString();
if (!str.empty()) if (!str.empty())
{ {
int idx = GetOrNewIndexForLocale(LocaleConstant(i)); int idx = GetOrNewIndexForLocale(LocaleConstant(i));
+1 -1
View File
@@ -652,7 +652,7 @@ class ObjectMgr
void LoadQuestLocales(); void LoadQuestLocales();
void LoadNpcTextLocales(); void LoadNpcTextLocales();
void LoadPageTextLocales(); void LoadPageTextLocales();
void LoadNpcOptionLocales(); void LoadGossipMenuItemsLocales();
void LoadPointOfInterestLocales(); void LoadPointOfInterestLocales();
void LoadInstanceTemplate(); void LoadInstanceTemplate();
void LoadMailLevelRewards(); void LoadMailLevelRewards();
+1 -1
View File
@@ -1311,7 +1311,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadQuestLocales(); objmgr.LoadQuestLocales();
objmgr.LoadNpcTextLocales(); objmgr.LoadNpcTextLocales();
objmgr.LoadPageTextLocales(); objmgr.LoadPageTextLocales();
objmgr.LoadNpcOptionLocales(); objmgr.LoadGossipMenuItemsLocales();
objmgr.LoadPointOfInterestLocales(); objmgr.LoadPointOfInterestLocales();
objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) objmgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
sLog.outString(">>> Localization strings loaded"); sLog.outString(">>> Localization strings loaded");