Core/WorldStates: Migrate conditions and criteria to new worldstate api
This commit is contained in:
1 parent
2521489e2b
commit
0461bdc730
2 files changed
+4
-3
No files matched your search
@@ -27,13 +27,14 @@
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldStateMgr.h"
|
||||
|
||||
char const* const ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX] =
|
||||
{
|
||||
@@ -410,7 +411,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
|
||||
}
|
||||
case CONDITION_WORLD_STATE:
|
||||
{
|
||||
condMeets = ConditionValue2 == sWorld->getWorldState(ConditionValue1);
|
||||
condMeets = sWorldStateMgr->GetValue(ConditionValue1, object->GetMap()) == int32(ConditionValue2);
|
||||
break;
|
||||
}
|
||||
case CONDITION_PHASEID:
|
||||
|
||||
@@ -7182,7 +7182,7 @@ void Player::UpdateHostileAreaState(AreaTableEntry const* area)
|
||||
{
|
||||
if (area)
|
||||
{
|
||||
if (InBattleground() || area->Flags & AREA_FLAG_COMBAT || (area->PvpCombatWorldStateID != -1 && sWorld->getWorldState(area->PvpCombatWorldStateID) != 0))
|
||||
if (InBattleground() || area->Flags & AREA_FLAG_COMBAT || (area->PvpCombatWorldStateID != -1 && sWorldStateMgr->GetValue(area->PvpCombatWorldStateID, GetMap()) != 0))
|
||||
pvpInfo.IsInHostileArea = true;
|
||||
else if (sWorld->IsPvPRealm() || (area->Flags & AREA_FLAG_UNK3))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user