*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)
|
if(m_spellState == SPELL_STATE_FINISHED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SetReferencedFromCurrent(false);
|
||||||
|
if(m_selfContainer)
|
||||||
|
*m_selfContainer = NULL;
|
||||||
|
|
||||||
uint32 oldState = m_spellState;
|
uint32 oldState = m_spellState;
|
||||||
m_spellState = SPELL_STATE_FINISHED;
|
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 )
|
if ( state == SPELL_STATE_PREPARING || state == SPELL_STATE_CASTING )
|
||||||
{
|
{
|
||||||
currentSpell->cancel();
|
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)
|
if(spell->m_spellInfo->Id==spellId)
|
||||||
{
|
{
|
||||||
spell->cancel();
|
spell->cancel();
|
||||||
spell->SetReferencedFromCurrent(false);
|
|
||||||
_player->m_currentSpells[CURRENT_CHANNELED_SPELL] = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user