aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SocialHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-08-18 18:59:58 +0200
committerOvahlord <dreadkiller@gmx.de>2024-08-18 20:39:21 +0200
commit25ffdbc5ef0859aeaadfa132329a498e86827e68 (patch)
treed7df51da8cdc3e3df7c50e5058803f9324715ee4 /src/server/game/Handlers/SocialHandler.cpp
parent0c98004896cb91ef2d22baa5569ff0e0d6cd15ee (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/game/Handlers/SocialHandler.cpp')
-rw-r--r--src/server/game/Handlers/SocialHandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Handlers/SocialHandler.cpp b/src/server/game/Handlers/SocialHandler.cpp
index 02e381e2be6..16dc1421da4 100644
--- a/src/server/game/Handlers/SocialHandler.cpp
+++ b/src/server/game/Handlers/SocialHandler.cpp
@@ -25,10 +25,9 @@
#include "Player.h"
#include "QueryCallback.h"
#include "RBAC.h"
-#include "Realm.h"
+#include "RealmList.h"
#include "SocialMgr.h"
#include "SocialPackets.h"
-#include "World.h"
void WorldSession::HandleContactListOpcode(WorldPackets::Social::SendContactList& packet)
{
@@ -104,7 +103,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPackets::Social::AddFriend& packet
}
// When not found, consult database
- GetQueryProcessor().AddCallback(AccountMgr::GetSecurityAsync(friendCharacterInfo->AccountId, realm.Id.Realm,
+ GetQueryProcessor().AddCallback(AccountMgr::GetSecurityAsync(friendCharacterInfo->AccountId, sRealmList->GetCurrentRealmId().Realm,
[this, continuation = std::move(processFriendRequest)](uint32 friendSecurity)
{
if (!AccountMgr::IsPlayerAccount(friendSecurity))