mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Changed GetLocaleByName to return invalid value on invalid input instead of LOCALE_enUS
* Also added IsValidLocale helper function
This commit is contained in:
@@ -218,7 +218,7 @@ uint32 Battlenet::Session::HandleLogon(authentication::v1::LogonRequest const* l
|
||||
return ERROR_BAD_PLATFORM;
|
||||
}
|
||||
|
||||
if (GetLocaleByName(logonRequest->locale()) == LOCALE_enUS && logonRequest->locale() != "enUS")
|
||||
if (!IsValidLocale(GetLocaleByName(logonRequest->locale())))
|
||||
{
|
||||
TC_LOG_DEBUG("session", "[Battlenet::LogonRequest] %s attempted to log in with unsupported locale (using %s)!", GetClientInfo().c_str(), logonRequest->locale().c_str());
|
||||
return ERROR_BAD_LOCALE;
|
||||
|
||||
Reference in New Issue
Block a user