aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions/ConditionMgr.cpp
diff options
context:
space:
mode:
authorMitchesD <majklprofik@seznam.cz>2015-12-03 21:37:33 +0100
committerMitchesD <majklprofik@seznam.cz>2015-12-03 21:37:33 +0100
commitcdb5bd3eb78ea40fbd927c5662e1dad778bf12d5 (patch)
treeff9d3aa54f82de2b1d70244ed2783d4884539dee /src/server/game/Conditions/ConditionMgr.cpp
parent9dde78716c0e51a9f43564c3bd9e26a2e83d3b9a (diff)
Core/Conditions: extended CONDITION_NEAR_CREATURE, condition value 3 is now used to check for dead creature entries (0 - alive, 1 - dead)
* I used 0 for alive to avoid touching all conditions with this type
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index e09b6a820f5..f5cb2b633ee 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -90,7 +90,7 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND
{ "Phase", true, false, false },
{ "Level", true, true, false },
{ "Quest Completed", true, false, false },
- { "Near Creature", true, true, false },
+ { "Near Creature", true, true, true },
{ "Near GameObject", true, true, false },
{ "Object Entry or Guid", true, true, true },
{ "Object TypeMask", true, false, false },
@@ -282,7 +282,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
}
case CONDITION_NEAR_CREATURE:
{
- condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
+ condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2, bool(!ConditionValue3)) ? true : false;
break;
}
case CONDITION_NEAR_GAMEOBJECT: