From 25ffdbc5ef0859aeaadfa132329a498e86827e68 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 18 Aug 2024 18:59:58 +0200 Subject: 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 --- src/server/scripts/World/action_ip_logger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 47691a565fd..9f83a15bd45 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -18,7 +18,7 @@ #include "ScriptMgr.h" #include "DatabaseEnv.h" #include "Player.h" -#include "Realm.h" +#include "RealmList.h" #include "World.h" #include "WorldSession.h" @@ -97,7 +97,7 @@ class AccountActionIpLogger : public AccountScript // We declare all the required variables uint32 playerGuid = accountId; - uint32 realmId = realm.Id.Realm; + uint32 realmId = sRealmList->GetCurrentRealmId().Realm; std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it later. // With this switch, we change systemNote so that we have a more accurate phrasing of what type it is. @@ -204,7 +204,7 @@ class CharacterActionIpLogger : public PlayerScript // We declare all the required variables uint32 playerGuid = player->GetSession()->GetAccountId(); - uint32 realmId = realm.Id.Realm; + uint32 realmId = sRealmList->GetCurrentRealmId().Realm; const std::string currentIp = player->GetSession()->GetRemoteAddress(); std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it... @@ -272,7 +272,7 @@ public: // Action IP Logger is only intialized if config is set up // Else, this script isn't loaded in the first place: We require no config check. - uint32 realmId = realm.Id.Realm; + uint32 realmId = sRealmList->GetCurrentRealmId().Realm; // Query playerGuid/accountId, as we only have characterGuid std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it later. -- cgit v1.2.3