diff options
author | megamage <none@none> | 2009-04-05 17:31:12 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-05 17:31:12 -0500 |
commit | e00106db5511f8a428c7b40df7e5f310bcefda16 (patch) | |
tree | 9bb07f021a113db05f897fa95e117ca206c5a163 /src | |
parent | fef43ddbe7c498be7d154926a88f09c2534f8d48 (diff) |
*Always delink spell and container when spell is cancelled.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellHandler.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1e9a2a7d60e..e8a5724dfb0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2133,6 +2133,10 @@ void Spell::cancel() if(m_spellState == SPELL_STATE_FINISHED) return; + SetReferencedFromCurrent(false); + if(m_selfContainer) + *m_selfContainer = NULL; + uint32 oldState = m_spellState; m_spellState = SPELL_STATE_FINISHED; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 15275417a59..c3af4d70a43 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3234,8 +3234,6 @@ void Aura::HandleAuraModSilence(bool apply, bool Real) if ( state == SPELL_STATE_PREPARING || state == SPELL_STATE_CASTING ) { currentSpell->cancel(); - currentSpell->SetReferencedFromCurrent(false); - m_target->m_currentSpells[i] = NULL; } } } diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index c4bbfe88be4..3da05d37f3d 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -392,8 +392,6 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) if(spell->m_spellInfo->Id==spellId) { spell->cancel(); - spell->SetReferencedFromCurrent(false); - _player->m_currentSpells[CURRENT_CHANNELED_SPELL] = NULL; } } return; |