Scripts/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute

Port From (https://github.com/TrinityCore/TrinityCore/commit/43134cadf192a468508605a62b2b56242a8311c8)
This commit is contained in:
hondacrx
2023-06-13 05:05:24 -04:00
parent 9f5c017e34
commit 2f8a453d5b
@@ -34,4 +34,32 @@ namespace Scripts.Shadowlands
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckProc, 0, AuraType.ProcTriggerSpell));
}
}
[Script] // 332753 - Superior Tactics
class spell_soulbind_superior_tactics : AuraScript
{
static uint SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA = 332926;
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA);
}
bool CheckProc(AuraEffect aurEff, ProcEventInfo procInfo)
{
if (GetTarget().HasAura(SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA))
return false;
// only dispels from friendly targets count
if (procInfo.GetHitMask().HasFlag(ProcFlagsHit.Dispel) && !procInfo.GetTypeMask().HasFlag(ProcFlags.DealHelpfulAbility | ProcFlags.DealHelpfulSpell | ProcFlags.DealHelpfulPeriodic))
return false;
return true;
}
public override void Register()
{
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckProc, 0, AuraType.ProcTriggerSpell));
}
}
}