aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2012-02-09 18:12:47 +0100
committerQAston <qaston@gmail.com>2012-02-09 18:12:47 +0100
commite0c699b0f303a22bdbea29e7e59b25a98d715a38 (patch)
tree5246dc5a8acd470763bf79d2564139ddf138bbe3
parentdc326131a3133d4e27b60ce42e7da83a4eca16b8 (diff)
Core/Db/Conditions: allow CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET to be used for spells with any spell using unit as explicit target instead of just TARGET_UNIT_TARGET_ANY and TARGET_UNIT_TARGET_ENEMY.
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 330a38ba5dd..5ae8e3005c4 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -985,20 +985,11 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
if (!conditions.empty())
break;
- for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
+ if (pSpellInfo->NeedsExplicitUnitTarget())
{
- if (pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ANY ||
- pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ANY)
- {
- bIsItemSpellValid = true;
- break;
- }
- }
-
- if (bIsItemSpellValid)
+ bIsItemSpellValid = true;
break;
+ }
}
}
}