[10189] Fix display of Interrupted message and fix channelled spells interrupting

This commit is contained in:
Laise 2010-07-14 13:22:32 +03:00
parent eadeda8f5d
commit 904ef55b4e
4 changed files with 20 additions and 23 deletions

View file

@ -2676,6 +2676,9 @@ void Spell::cancel()
if(m_spellState == SPELL_STATE_FINISHED)
return;
// channeled spells don't display interrupted message even if they are interrupted, possible other cases with no "Interrupted" message
bool sendInterrupt = IsChanneledSpell(m_spellInfo) ? false : true;
m_autoRepeat = false;
switch (m_spellState)
{
@ -2683,7 +2686,9 @@ void Spell::cancel()
case SPELL_STATE_DELAYED:
{
SendInterrupted(0);
SendCastResult(SPELL_FAILED_INTERRUPTED);
if (sendInterrupt)
SendCastResult(SPELL_FAILED_INTERRUPTED);
} break;
case SPELL_STATE_CASTING:
@ -2700,7 +2705,9 @@ void Spell::cancel()
SendChannelUpdate(0);
SendInterrupted(0);
SendCastResult(SPELL_FAILED_INTERRUPTED);
if (sendInterrupt)
SendCastResult(SPELL_FAILED_INTERRUPTED);
} break;
default: