aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/SpellHandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index 45d4414d9ed..3978d582e84 100755
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -424,12 +424,8 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
if (!spellInfo)
return;
- // not allow remove non positive spells and spells with attr SPELL_ATTR0_CANT_CANCEL
- if (!spellInfo->IsPositive() || (spellInfo->Attributes & SPELL_ATTR0_CANT_CANCEL))
- return;
-
- // don't allow cancelling passive auras (some of them are visible)
- if (spellInfo->IsPassive())
+ // not allow remove spells with attr SPELL_ATTR0_CANT_CANCEL
+ if (spellInfo->Attributes & SPELL_ATTR0_CANT_CANCEL)
return;
// channeled spell case (it currently casted then)
@@ -441,7 +437,12 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
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?
_player->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
}