Core/Spells: Change logic in assertion in Spell::SelectImplicitTargetObjectTargets.

Not sure if this a step in the right direction for the intended design, but following the logic of the function there should be OR unit target OR gameobject target OR item target pointers available. If Item target doesn't belong there then the already present AddItemTarget call should be removed.
This commit is contained in:
Machiavelli
2012-02-22 19:16:47 +01:00
parent 1536a340af
commit fa546d1428
+1 -1
View File
@@ -1508,7 +1508,7 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImpli
void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType) void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{ {
ASSERT(m_targets.GetObjectTarget() && "Spell::SelectImplicitTargetObjectTargets - no explicit object target available!"); ASSERT((m_targets.GetObjectTarget() || m_targets.GetItemTarget()) && "Spell::SelectImplicitTargetObjectTargets - no explicit object or item target available!");
if (Unit* unit = m_targets.GetUnitTarget()) if (Unit* unit = m_targets.GetUnitTarget())
AddUnitTarget(unit, 1 << effIndex); AddUnitTarget(unit, 1 << effIndex);
else if (GameObject* gobj = m_targets.GetGOTarget()) else if (GameObject* gobj = m_targets.GetGOTarget())