diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 0e5bfa0d653..bc19e1cc51d 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3669,8 +3669,12 @@ void Spell::update(uint32 difftime) if (!UpdateChanneledTargetList()) { TC_LOG_DEBUG("spells", "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id); - SendChannelUpdate(0); - finish(); + m_timer = 0; + + // Also remove applied auras + for (TargetInfo const& target : m_UniqueTargetInfo) + if (Unit* unit = m_caster->GetGUID() == target.targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target.targetGUID)) + unit->RemoveOwnedAura(m_spellInfo->Id, m_originalCasterGUID, 0, AURA_REMOVE_BY_CANCEL); } if (m_timer > 0) |