From a1e2ad439db6e69ab146655951f730c766b351f9 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 6 May 2023 13:53:26 +0200 Subject: [PATCH] Core/Spells: Check passive attribute on the final spell that will be cast by CMSG_CAST_SPELL, after taking overriden spells into account --- src/server/game/Handlers/SpellHandler.cpp | 6 +++--- 1 file 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;