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.
This commit is contained in:
@@ -985,21 +985,12 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
if (!conditions.empty())
|
||||
break;
|
||||
|
||||
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
||||
{
|
||||
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)
|
||||
if (pSpellInfo->NeedsExplicitUnitTarget())
|
||||
{
|
||||
bIsItemSpellValid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bIsItemSpellValid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user