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)
This commit is contained in:
hondacrx
2023-05-21 17:05:13 -04:00
parent 63b8922a9e
commit 0951190623
+3 -3
View File
@@ -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;