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,20 +985,11 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
|||||||
if (!conditions.empty())
|
if (!conditions.empty())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
if (pSpellInfo->NeedsExplicitUnitTarget())
|
||||||
{
|
{
|
||||||
if (pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
|
bIsItemSpellValid = true;
|
||||||
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)
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user