mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -76,7 +76,7 @@ enum ConditionTypes
|
||||
CONDITION_PHASEID = 26, // phaseid 0 0 true if object is in phaseid
|
||||
CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement)
|
||||
CONDITION_QUEST_COMPLETE = 28, // quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded
|
||||
CONDITION_NEAR_CREATURE = 29, // creature entry distance 0 true if there is a creature of entry in range
|
||||
CONDITION_NEAR_CREATURE = 29, // creature entry distance dead (0/1) true if there is a creature of entry in range
|
||||
CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance 0 true if there is a gameobject of entry in range
|
||||
CONDITION_OBJECT_ENTRY_GUID = 31, // TypeID entry guid true if object is type TypeID and the entry is 0 or matches entry of the object or matches guid of the object
|
||||
CONDITION_TYPE_MASK = 32, // TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask
|
||||
|
||||
Reference in New Issue
Block a user