From 5dd686c080723eeeefdabb50b867f9f662d5deb9 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 31 Dec 2017 16:01:06 +0100 Subject: Core/Locales: Optimize locale loading - move the strings --- src/server/game/Texts/CreatureTextMgr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/server/game/Texts') diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index f3d5617c35d..44ebcf5802a 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -195,14 +195,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)); -- cgit v1.2.3