aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.cpp
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2020-04-04 17:05:00 +0400
committerGitHub <noreply@github.com>2020-04-04 15:05:00 +0200
commit0f506f0dea41230a5957cf5f3ae3b08787e50633 (patch)
treea380409a22accb0ea2c004b03d27bdae28cc3da4 /src/server/game/Texts/CreatureTextMgr.cpp
parent1794338532be2e76c0d39c81f94788b8269e602f (diff)
Core/Locales: Optimize locale loading - move the strings (#24385)
* Core/Locales: Optimize locale loading - move the strings (cherry picked from commit 5dd686c080723eeeefdabb50b867f9f662d5deb9) Signed-off-by: ForesterDev <gmmunchkinbox@gmail.com> # Conflicts: # src/server/game/Globals/ObjectMgr.cpp * Fix AchievementReward locales build Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index d587aaf2670..9d7efaa71ac 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -193,14 +193,13 @@ void CreatureTextMgr::LoadCreatureTextLocales()
uint32 groupId = fields[1].GetUInt8();
uint32 id = fields[2].GetUInt8();
std::string localeName = fields[3].GetString();
- std::string text = fields[4].GetString();
- CreatureTextLocale& data = mLocaleTextMap[CreatureTextId(creatureId, groupId, id)];
LocaleConstant locale = GetLocaleByName(localeName);
if (locale == LOCALE_enUS)
continue;
- ObjectMgr::AddLocaleString(text, locale, data.Text);
+ CreatureTextLocale& data = mLocaleTextMap[CreatureTextId(creatureId, groupId, id)];
+ ObjectMgr::AddLocaleString(fields[4].GetString(), locale, data.Text);
} while (result->NextRow());
TC_LOG_INFO("server.loading", ">> Loaded %u creature localized texts in %u ms", uint32(mLocaleTextMap.size()), GetMSTimeDiffToNow(oldMSTime));