diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
commit | 85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch) | |
tree | df3d2084ee2e35008903c03178039b9c986e2d08 /src/server/game/Conditions/ConditionMgr.cpp | |
parent | 052fc24315ace866ea1cf610e85df119b68100c9 (diff) |
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 4d7146b1f3c..146d2cb3bde 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -18,16 +18,21 @@ #include "ConditionMgr.h" #include "AchievementMgr.h" +#include "DatabaseEnv.h" #include "GameEventMgr.h" +#include "GameObject.h" #include "InstanceScript.h" +#include "Log.h" +#include "LootMgr.h" +#include "Map.h" #include "ObjectMgr.h" #include "Player.h" #include "Pet.h" #include "ReputationMgr.h" -#include "ScriptedCreature.h" #include "ScriptMgr.h" #include "SpellAuras.h" #include "SpellMgr.h" +#include "World.h" char const* const ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX] = { @@ -289,12 +294,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: @@ -1073,7 +1078,7 @@ void ConditionMgr::LoadConditions(bool isReload) } cond->ReferenceId = uint32(abs(iConditionTypeOrReference)); - const char* rowType = "reference template"; + char const* rowType = "reference template"; if (iSourceTypeOrReferenceId >= 0) rowType = "reference"; //check for useless data |