*Always delink spell and container when spell is cancelled.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-05 17:31:12 -05:00
parent fef43ddbe7
commit e00106db55
3 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;
}
}
}

View File

@@ -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;