diff options
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 630d3c5a730..e3e92d6aa3a 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -18,6 +18,7 @@ #include "ConditionMgr.h" #include "AchievementMgr.h" +#include "Containers.h" #include "DatabaseEnv.h" #include "GameEventMgr.h" #include "GameObject.h" @@ -30,9 +31,9 @@ #include "Pet.h" #include "ReputationMgr.h" #include "ScriptMgr.h" -#include "ScriptedCreature.h" #include "SpellAuras.h" #include "SpellMgr.h" +#include "World.h" char const* const ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX] = { @@ -295,12 +296,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const } case CONDITION_NEAR_CREATURE: { - condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2, bool(!ConditionValue3)) ? true : false; + condMeets = object->FindNearestCreature(ConditionValue1, (float)ConditionValue2, bool(!ConditionValue3)) != nullptr; break; } case CONDITION_NEAR_GAMEOBJECT: { - condMeets = GetClosestGameObjectWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false; + condMeets = object->FindNearestGameObject(ConditionValue1, (float)ConditionValue2) != nullptr; break; } case CONDITION_OBJECT_ENTRY_GUID: |