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:
@@ -291,9 +291,6 @@ namespace Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellInfo.IsPassive())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit caster = mover;
|
Unit caster = mover;
|
||||||
if (caster.IsTypeId(TypeId.Unit) && !caster.ToCreature().HasSpell(spellInfo.Id))
|
if (caster.IsTypeId(TypeId.Unit) && !caster.ToCreature().HasSpell(spellInfo.Id))
|
||||||
{
|
{
|
||||||
@@ -336,6 +333,9 @@ namespace Game
|
|||||||
// Check possible spell cast overrides
|
// Check possible spell cast overrides
|
||||||
spellInfo = caster.GetCastSpellInfo(spellInfo);
|
spellInfo = caster.GetCastSpellInfo(spellInfo);
|
||||||
|
|
||||||
|
if (spellInfo.IsPassive())
|
||||||
|
return;
|
||||||
|
|
||||||
// can't use our own spells when we're in possession of another unit,
|
// can't use our own spells when we're in possession of another unit,
|
||||||
if (GetPlayer().IsPossessing())
|
if (GetPlayer().IsPossessing())
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user