aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-05-06 13:53:26 +0200
committerShauren <shauren.trinity@gmail.com>2023-05-06 13:53:26 +0200
commita1e2ad439db6e69ab146655951f730c766b351f9 (patch)
treefd39f335c762501e204f23e3d8c17b0be05f6afa /src
parentfa242fac76b79e1927bf2e6fecf7a1fab2f8ea8a (diff)
Core/Spells: Check passive attribute on the final spell that will be cast by CMSG_CAST_SPELL, after taking overriden spells into account
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index da29e00af5b..2eac8d32b20 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -311,9 +311,6 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast)
return;
}
- if (spellInfo->IsPassive())
- return;
-
Unit* caster = mover;
if (caster->GetTypeId() == TYPEID_UNIT && !caster->ToCreature()->HasSpell(spellInfo->Id))
{
@@ -354,6 +351,9 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast)
// Check possible spell cast overrides
spellInfo = caster->GetCastSpellInfo(spellInfo);
+ if (spellInfo->IsPassive())
+ return;
+
// can't use our own spells when we're in possession of another unit,
if (_player->isPossessing())
return;