Core/Misc: Changed GetLocaleByName to return invalid value on invalid input instead of LOCALE_enUS
Port From (https://github.com/TrinityCore/TrinityCore/commit/79cd94d26df33a332586b2aa72a99b123199c88f)
This commit is contained in:
@@ -143,7 +143,7 @@ namespace Game
|
||||
uint id = result.Read<byte>(2);
|
||||
string localeName = result.Read<string>(3);
|
||||
Locale locale = localeName.ToEnum<Locale>();
|
||||
if (locale == Locale.enUS)
|
||||
if (!SharedConst.IsValidLocale(locale) || locale == Locale.enUS)
|
||||
continue;
|
||||
|
||||
var key = new CreatureTextId(creatureId, groupId, id);
|
||||
|
||||
Reference in New Issue
Block a user