diff options
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 6 | ||||
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 4cd00ae322a..b1f6322237d 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -47,7 +47,11 @@ bool Condition::Meets(Player * player, Unit* invoker) condMeets = true; // empty condition, always met break; case CONDITION_AURA: - condMeets = player->HasAuraEffect(mConditionValue1, mConditionValue2); + refId = 0; + if (!mConditionValue2) + condMeets = player->HasAuraEffect(mConditionValue1, mConditionValue2); + else if (Unit* target = player->GetSelectedUnit()) + condMeets = target->HasAuraEffect(mConditionValue1, mConditionValue2); break; case CONDITION_ITEM: condMeets = player->HasItemCount(mConditionValue1, mConditionValue2); diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 4f5dcdf07b3..d245483a6d7 100755 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -28,7 +28,7 @@ class LootTemplate; enum ConditionType { // value1 value2 value3 CONDITION_NONE = 0, // 0 0 0 always true - CONDITION_AURA = 1, // spell_id effindex +referenceID true if has aura of spell_id with effect effindex + CONDITION_AURA = 1, // spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex CONDITION_ITEM = 2, // item_id count +referenceID true if has #count of item_ids CONDITION_ITEM_EQUIPPED = 3, // item_id 0 +referenceID true if has item_id equipped CONDITION_ZONEID = 4, // zone_id 0 +referenceID true if in zone_id |