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:41:03 +0100
commitab831507c64c8a0bc838ec835299c79f88c70ed7 (patch)
treec1110beb024c02fae5d24338d31bd1bbe4318785 /src/server/game/Conditions/ConditionMgr.cpp
parent94e4bddb903d581293b5a7f50f9b32d1262d2c20 (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 (cherry picked from commit cdb5bd3eb78ea40fbd927c5662e1dad778bf12d5)
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 8e8c640ccf7..bae400adcc2 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -89,7 +89,7 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND
{ "PhaseMask", 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 },
@@ -280,7 +280,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: