mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
*Always delink spell and container when spell is cancelled.
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user