Core/Spells: fix Global Cooldown reset on spell cast interrupt.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user