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/fe38437e67cf7a17911ba6d783466e0a3874535f)
This commit is contained in:
hondacrx
2023-05-02 17:08:57 -04:00
parent 6a38576ff3
commit 1009fac05f
2 changed files with 47 additions and 0 deletions
+19
View File
@@ -4205,4 +4205,23 @@ namespace Scripts.Spells.Items
AfterHit.Add(new HitHandler(TriggerAdditionalDamage));
}
}
[Script] // 295175 - Spiteful Binding
class spell_item_grips_of_forsaken_sanity : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1;
}
bool CheckHealth(AuraEffect aurEff, ProcEventInfo eventInfo)
{
return eventInfo.GetActor().GetHealthPct() >= (float)GetEffectInfo(1).CalcValue();
}
public override void Register()
{
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckHealth, 0, AuraType.ProcTriggerSpell));
}
}
}