mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7663] Fixed crash at interrupting channeled spell. Cleanup spell interrupt code.
This commit is contained in:
parent
b143a300cb
commit
56350b32ed
4 changed files with 18 additions and 52 deletions
|
|
@ -372,17 +372,11 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
|||
return;
|
||||
|
||||
// channeled spell case (it currently casted then)
|
||||
if(IsChanneledSpell(spellInfo))
|
||||
if (IsChanneledSpell(spellInfo))
|
||||
{
|
||||
if(Spell* spell = _player->m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||
{
|
||||
if(spell->m_spellInfo->Id==spellId)
|
||||
{
|
||||
spell->cancel();
|
||||
spell->SetReferencedFromCurrent(false);
|
||||
_player->m_currentSpells[CURRENT_CHANNELED_SPELL] = NULL;
|
||||
}
|
||||
}
|
||||
if (_player->m_currentSpells[CURRENT_CHANNELED_SPELL] &&
|
||||
_player->m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->Id==spellId)
|
||||
_player->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue