diff options
author | Blaymoira <none@none> | 2009-03-08 09:01:00 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-08 09:01:00 +0100 |
commit | 3c1fff341d07b891f386fa40dbdf25fcfb565c5f (patch) | |
tree | 00c17ce409183e581e1766bbabfe754c3b539c09 /src/game/Spell.cpp | |
parent | ae7078784366172e27d2fe0ac4b18345b628fd3f (diff) | |
parent | 658568a8e2eb749ea974b45e09b7e2775d6e0c69 (diff) |
*Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 15cee611db0..378bd06aa95 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2125,8 +2125,11 @@ void Spell::cancel() if(m_spellState == SPELL_STATE_FINISHED) return; + uint32 oldState = m_spellState; + m_spellState = SPELL_STATE_FINISHED; + m_autoRepeat = false; - switch (m_spellState) + switch (oldState) { case SPELL_STATE_PREPARING: case SPELL_STATE_DELAYED: @@ -2158,10 +2161,13 @@ void Spell::cancel() } break; } - finish(false); - m_caster->RemoveDynObject(m_spellInfo->Id); m_caster->RemoveGameObject(m_spellInfo->Id,true); + + //set state back so finish will be processed + m_spellState = oldState; + + finish(false); } void Spell::cast(bool skipCheck) |