aboutsummaryrefslogtreecommitdiff
path: root/src/server/bnetserver/Server/Session.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-08-18 18:59:58 +0200
committerShauren <shauren.trinity@gmail.com>2024-08-18 18:59:58 +0200
commitc4b710446d62c95eb8124175203fa5f394912594 (patch)
treec0e64d7fe1b315a34df65e4c44f0ad3d8723edf4 /src/server/bnetserver/Server/Session.cpp
parent88fea990ff1408b94076fb9dbd0c974908d6a731 (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
Diffstat (limited to 'src/server/bnetserver/Server/Session.cpp')
-rw-r--r--src/server/bnetserver/Server/Session.cpp6
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;
}