aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions/ConditionMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-21 23:18:43 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-21 23:18:43 +0200
commit3d7c2ef88f2ca3293a1df0411ad49e3eb5a96079 (patch)
treed9a92cf30fcf560d837e2b3b0a212a6834534f46 /src/server/game/Conditions/ConditionMgr.cpp
parent3cb8f532dae1062c5f5bcda1b980463da99fe547 (diff)
Core/Game: Include cleanup, part 4 - packets and largest headers (after preprocessing, except player/objectmgr)
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp7
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: