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:
@@ -30,7 +30,7 @@ namespace BNetServer.Networking
|
||||
return BattlenetRpcErrorCode.BadPlatform;
|
||||
}
|
||||
|
||||
if (logonRequest.Locale.ToEnum<Locale>() == Locale.enUS && logonRequest.Locale != "enUS")
|
||||
if (!SharedConst.IsValidLocale(logonRequest.Locale.ToEnum<Locale>()))
|
||||
{
|
||||
Log.outDebug(LogFilter.Session, $"Battlenet.LogonRequest: {GetClientInfo()} attempted to log in with unsupported locale (using {logonRequest.Locale})!");
|
||||
return BattlenetRpcErrorCode.BadLocale;
|
||||
|
||||
Reference in New Issue
Block a user