aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions/ConditionMgr.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/Conditions/ConditionMgr.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/Conditions/ConditionMgr.cpp')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 710bfec570c..357e0be46e4 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -43,7 +43,7 @@
#include "PhasingHandler.h"
#include "Player.h"
#include "RaceMask.h"
-#include "Realm.h"
+#include "RealmList.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "Spell.h"
@@ -3328,7 +3328,7 @@ static int32(* const WorldStateExpressionFunctions[WSE_FUNCTION_MAX])(Map const*
// WSE_FUNCTION_REGION
[](Map const* /*map*/, uint32 /*arg1*/, uint32 /*arg2*/) -> int32
{
- return realm.Id.Region;
+ return sRealmList->GetCurrentRealmId().Region;
},
// WSE_FUNCTION_CLOCK_HOUR
@@ -3376,7 +3376,7 @@ static int32(* const WorldStateExpressionFunctions[WSE_FUNCTION_MAX])(Map const*
{
time_t now = GameTime::GetGameTime();
uint32 raidOrigin = 1135695600;
- if (Cfg_RegionsEntry const* region = sCfgRegionsStore.LookupEntry(realm.Id.Region))
+ if (Cfg_RegionsEntry const* region = sCfgRegionsStore.LookupEntry(sRealmList->GetCurrentRealmId().Region))
raidOrigin = region->Raidorigin;
return (now - raidOrigin) / WEEK;