mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[6833] More correct aura cancel for channeled spells.
Remove auras at channeled target. Cancel channeled spell at spell aura cancel. Also move battleground resurection spell code to more appropriate place.
This commit is contained in:
parent
e12e79a94d
commit
0ae2133254
5 changed files with 76 additions and 19 deletions
|
|
@ -355,15 +355,23 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
|||
if(!IsPositiveSpell(spellId) || (spellInfo->Attributes & SPELL_ATTR_CANT_CANCEL))
|
||||
return;
|
||||
|
||||
_player->RemoveAurasDueToSpellByCancel(spellId);
|
||||
|
||||
if (spellId == 2584) // Waiting to resurrect spell cancel, we must remove player from resurrect queue
|
||||
// channeled spell case (it currently casted then)
|
||||
if(IsChanneledSpell(spellInfo))
|
||||
{
|
||||
BattleGround *bg = _player->GetBattleGround();
|
||||
if(!bg)
|
||||
return;
|
||||
bg->RemovePlayerFromResurrectQueue(_player->GetGUID());
|
||||
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;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// non channeled case
|
||||
_player->RemoveAurasDueToSpellByCancel(spellId);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue