diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9b1d2c2e83..58186cb653 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3954,10 +3954,6 @@ void Spell::update(uint32 difftime) { SendChannelUpdate(0); finish(); - - if (Creature* creatureCaster = m_caster->ToCreature()) - if (creatureCaster->IsAIEnabled) - creatureCaster->AI()->OnSpellCastFinished(m_spellInfo, SPELL_FINISHED_CHANNELING_COMPLETE); } break; } @@ -4048,6 +4044,11 @@ void Spell::finish(bool ok, bool sendChannelUpdate /* = false */) // Stop Attack for some spells if (m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET)) m_caster->AttackStop(); + + if (m_spellInfo->IsChanneled()) + if (Creature* creatureCaster = m_caster->ToCreature()) + if (creatureCaster->IsAIEnabled) + creatureCaster->AI()->OnSpellCastFinished(m_spellInfo, SPELL_FINISHED_CHANNELING_COMPLETE); } void Spell::WriteCastResultInfo(WorldPacket& data, Player* caster, SpellInfo const* spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError, uint32* param1 /*= nullptr*/, uint32* param2 /*= nullptr*/)