Core/Spells: Prevent manual cancelling of channelled spells that have SPELL_ATTR0_CANT_CANCEL
This commit is contained in:
1 parent
2b2237b7bc
commit
b28ff89c5d
1 file changed
+8
-4
@@ -394,6 +394,12 @@ void WorldSession::HandleCancelChanneling(WorldPacket& recvData)
|
||||
uint32 spellId = 0;
|
||||
recvData >> spellId; // Spell Id
|
||||
|
||||
Unit* mover = GetGameClient()->GetActivelyMovedUnit();
|
||||
|
||||
// ignore for remote control state (for player case)
|
||||
if (!mover)
|
||||
return;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
return;
|
||||
@@ -402,10 +408,8 @@ void WorldSession::HandleCancelChanneling(WorldPacket& recvData)
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_AURA_CANCEL))
|
||||
return;
|
||||
|
||||
Unit* mover = GetGameClient()->GetActivelyMovedUnit();
|
||||
|
||||
// ignore for remote control state (for player case)
|
||||
if (!mover)
|
||||
Spell* spell = mover->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
|
||||
if (!spell || spell->GetSpellInfo()->Id != spellInfo->Id)
|
||||
return;
|
||||
|
||||
mover->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
|
||||
Reference in new issue
Block a user