aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
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/scripts/World
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/scripts/World')
-rw-r--r--src/server/scripts/World/action_ip_logger.cpp8
1 files changed, 4 insertions, 4 deletions
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.