aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-06-30 00:22:25 +0200
committerShauren <shauren.trinity@gmail.com>2020-06-30 00:22:25 +0200
commit79cd94d26df33a332586b2aa72a99b123199c88f (patch)
treedba4de419d8c470b4f932702d0ba71da569c9e03 /src/server/game/Texts/CreatureTextMgr.cpp
parent40c71ea9fca547f2a6fd547cb1cd35af361c4f3c (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.cpp2
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)];