Core/Spells: Core/Spells: Fix manual cancel of mind control. closes #2676
This commit is contained in:
@@ -424,12 +424,8 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
|
|||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// not allow remove non positive spells and spells with attr SPELL_ATTR0_CANT_CANCEL
|
// not allow remove spells with attr SPELL_ATTR0_CANT_CANCEL
|
||||||
if (!spellInfo->IsPositive() || (spellInfo->Attributes & SPELL_ATTR0_CANT_CANCEL))
|
if (spellInfo->Attributes & SPELL_ATTR0_CANT_CANCEL)
|
||||||
return;
|
|
||||||
|
|
||||||
// don't allow cancelling passive auras (some of them are visible)
|
|
||||||
if (spellInfo->IsPassive())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// channeled spell case (it currently casted then)
|
// channeled spell case (it currently casted then)
|
||||||
@@ -441,7 +437,12 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// non channeled case
|
// non channeled case:
|
||||||
|
// don't allow remove non positive spells
|
||||||
|
// don't allow cancelling passive auras (some of them are visible)
|
||||||
|
if (!spellInfo->IsPositive() || spellInfo->IsPassive())
|
||||||
|
return;
|
||||||
|
|
||||||
// maybe should only remove one buff when there are multiple?
|
// maybe should only remove one buff when there are multiple?
|
||||||
_player->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
|
_player->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user