Permalink
Browse files

Remove logic in favor of proper filling in child spell

TARGET_SELF channeled targets seem to have child spells which fill their
own targets properly

(based on cmangos/mangos-wotlk@5239761)

Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information...
killerwife authored and xfurry committed Jan 6, 2018
1 parent a945ffe commit 1f142f5f2ac1359344bf07789f5aa044f947a16a
Showing with 1 addition and 20 deletions.
  1. +1 −20 src/game/Spells/SpellAuras.cpp
@@ -2053,31 +2053,12 @@ void Aura::TriggerSpell()
SpellEffectEntry const* spellEffect = GetSpellProto()->GetSpellEffect(GetEffIndex());
// for channeled spell cast applied from aura owner to channel target (persistent aura affects already applied to true target)
// come periodic casts applied to targets, so need seelct proper caster (ex. 15790)
// come periodic casts applied to targets, so need select proper caster (ex. 15790)
if (IsChanneledSpell(GetSpellProto()) && (spellEffect && spellEffect->Effect != SPELL_EFFECT_PERSISTENT_AREA_AURA))
{
// interesting 2 cases: periodic aura at caster of channeled spell
if (target->GetObjectGuid() == casterGUID)
{
triggerCaster = target;
if (WorldObject* channelTarget = target->GetMap()->GetWorldObject(target->GetChannelObjectGuid()))
{
if (channelTarget->isType(TYPEMASK_UNIT))
triggerTarget = (Unit*)channelTarget;
else
triggerTargetObject = channelTarget;
}
}
// or periodic aura at caster channel target
else if (Unit* caster = GetCaster())
{
if (target->GetObjectGuid() == caster->GetChannelObjectGuid())
{
triggerCaster = caster;
triggerTarget = target;
}
}
}
// Spell exist but require custom code

0 comments on commit 1f142f5

Please sign in to comment.