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:
hondacrx
2020-07-14 17:11:56 -04:00
parent e179d29b55
commit 4bb9823456
5 changed files with 21 additions and 16 deletions
@@ -370,6 +370,11 @@ namespace Framework.Constants
}
return SkillType.None;
}
public static bool IsValidLocale(Locale locale)
{
return locale < Locale.Total && locale != Locale.None;
}
}
public enum Locale