Merge pull request #10887 from zorix/PR3

Core/Spell:  Triggered spells now will be cast on the primal target instead of on caster

Closes #10853
Closes #10860
This commit is contained in:
Sebastian Valle Herrera
2014-07-08 09:57:37 -05:00
2 changed files with 5 additions and 1 deletions

View File

@@ -1305,6 +1305,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
ASSERT(m_targets.GetObjectTarget() && "Spell::SelectImplicitTargetDestTargets - no explicit object target available!");
WorldObject* target = m_targets.GetObjectTarget();
SpellDestination dest(*target);

View File

@@ -866,7 +866,10 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
if (spellInfo->GetExplicitTargetMask() & TARGET_FLAG_DEST_LOCATION)
targets.SetDst(m_targets);
targets.SetUnitTarget(m_caster);
if (Unit* target = m_targets.GetUnitTarget())
targets.SetUnitTarget(target);
else
targets.SetUnitTarget(m_caster);
}
CustomSpellValues values;