Core/Spells: fix Global Cooldown reset on spell cast interrupt.

This commit is contained in:
SimonDMII
2011-04-11 16:35:31 +06:00
committed by Azazel
parent 5357b1ba77
commit e38634186c
2 changed files with 7 additions and 9 deletions
+4 -4
View File
@@ -3015,10 +3015,6 @@ void Spell::cancel()
if (m_spellState == SPELL_STATE_FINISHED)
return;
SetReferencedFromCurrent(false);
if (m_selfContainer && *m_selfContainer == this)
*m_selfContainer = NULL;
uint32 oldState = m_spellState;
m_spellState = SPELL_STATE_FINISHED;
@@ -3053,6 +3049,10 @@ void Spell::cancel()
break;
}
SetReferencedFromCurrent(false);
if (m_selfContainer && *m_selfContainer == this)
*m_selfContainer = NULL;
if (m_caster->GetTypeId() == TYPEID_PLAYER)
m_caster->ToPlayer()->RemoveGlobalCooldown(m_spellInfo);