diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-08-18 18:59:58 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-08-18 20:39:21 +0200 |
commit | 25ffdbc5ef0859aeaadfa132329a498e86827e68 (patch) | |
tree | d7df51da8cdc3e3df7c50e5058803f9324715ee4 /src/server/bnetserver/Server/Session.cpp | |
parent | 0c98004896cb91ef2d22baa5569ff0e0d6cd15ee (diff) |
Core/Realms: Realmlist refactors
* Removed global realm variable from World and use RealmList everywhere
* Match auth build key with client version
* Restored allowedSecurityLevel checks for realmlist packet building
* Restored updating population field, mysteriously removed 15 years ago in f20b25d1c90f608deab28c9957b3b376ab2a0d50
(cherry picked from commit c4b710446d62c95eb8124175203fa5f394912594)
# Conflicts:
# sql/base/auth_database.sql
Diffstat (limited to 'src/server/bnetserver/Server/Session.cpp')
-rw-r--r-- | src/server/bnetserver/Server/Session.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/bnetserver/Server/Session.cpp b/src/server/bnetserver/Server/Session.cpp index c94ee6e3e56..46fd1d1479a 100644 --- a/src/server/bnetserver/Server/Session.cpp +++ b/src/server/bnetserver/Server/Session.cpp @@ -625,7 +625,7 @@ uint32 Battlenet::Session::GetLastCharPlayed(std::unordered_map<std::string, Var auto lastPlayerChar = _gameAccountInfo->LastPlayedCharacters.find(subRegion->string_value()); if (lastPlayerChar != _gameAccountInfo->LastPlayedCharacters.end()) { - std::vector<uint8> compressed = sRealmList->GetRealmEntryJSON(lastPlayerChar->second.RealmId, _build); + std::vector<uint8> compressed = sRealmList->GetRealmEntryJSON(lastPlayerChar->second.RealmId, _build, _gameAccountInfo->SecurityLevel); if (compressed.empty()) return ERROR_UTIL_SERVER_FAILED_TO_SERIALIZE_RESPONSE; @@ -662,7 +662,7 @@ uint32 Battlenet::Session::GetRealmList(std::unordered_map<std::string, Variant if (Variant const* subRegion = GetParam(params, "Command_RealmListRequest_v1")) subRegionId = subRegion->string_value(); - std::vector<uint8> compressed = sRealmList->GetRealmList(_build, subRegionId); + std::vector<uint8> compressed = sRealmList->GetRealmList(_build, _gameAccountInfo->SecurityLevel, subRegionId); if (compressed.empty()) return ERROR_UTIL_SERVER_FAILED_TO_SERIALIZE_RESPONSE; @@ -698,7 +698,7 @@ uint32 Battlenet::Session::JoinRealm(std::unordered_map<std::string, Variant con { if (Variant const* realmAddress = GetParam(params, "Param_RealmAddress")) return sRealmList->JoinRealm(realmAddress->uint_value(), _build, GetRemoteIpAddress(), _clientSecret, GetLocaleByName(_locale), - _os, _timezoneOffset, _gameAccountInfo->Name, response); + _os, _timezoneOffset, _gameAccountInfo->Name, _gameAccountInfo->SecurityLevel, response); return ERROR_WOW_SERVICES_INVALID_JOIN_TICKET; } |