From 095119062349f1e6bf89146413297c5dde9dd090 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 21 May 2023 17:05:13 -0400 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 Port From (https://github.com/TrinityCore/TrinityCore/commit/a1e2ad439db6e69ab146655951f730c766b351f9) --- Source/Game/Handlers/SpellHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Game/Handlers/SpellHandler.cs b/Source/Game/Handlers/SpellHandler.cs index 7b97b8b34..9f846230a 100644 --- a/Source/Game/Handlers/SpellHandler.cs +++ b/Source/Game/Handlers/SpellHandler.cs @@ -291,9 +291,6 @@ namespace Game return; } - if (spellInfo.IsPassive()) - return; - Unit caster = mover; if (caster.IsTypeId(TypeId.Unit) && !caster.ToCreature().HasSpell(spellInfo.Id)) { @@ -336,6 +333,9 @@ namespace Game // 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 (GetPlayer().IsPossessing()) return;