diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-06-30 00:22:25 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-06-30 00:22:25 +0200 |
commit | 79cd94d26df33a332586b2aa72a99b123199c88f (patch) | |
tree | dba4de419d8c470b4f932702d0ba71da569c9e03 /src/server/game/Texts/CreatureTextMgr.cpp | |
parent | 40c71ea9fca547f2a6fd547cb1cd35af361c4f3c (diff) |
Core/Misc: Changed GetLocaleByName to return invalid value on invalid input instead of LOCALE_enUS
* Also added IsValidLocale helper function
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rw-r--r-- | src/server/game/Texts/CreatureTextMgr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 78e96e12492..30f578aa872 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -197,7 +197,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() std::string localeName = fields[3].GetString(); LocaleConstant locale = GetLocaleByName(localeName); - if (locale == LOCALE_enUS) + if (!IsValidLocale(locale) || locale == LOCALE_enUS) continue; CreatureTextLocale& data = mLocaleTextMap[CreatureTextId(creatureId, groupId, id)]; |