aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions
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/game/Conditions
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/game/Conditions')
-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 578aae3f18d..1a6ae405edb 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"
@@ -3396,7 +3396,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
@@ -3444,7 +3444,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;