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
+28
View File
@@ -44,6 +44,9 @@ namespace Scripts.Spells.Azerite
// Echoing Blades
public const uint EchoingBladesTrait = 287649;
// Hour of Reaping
public const uint DHSoulBarrier = 263648;
}
[Script]
@@ -438,6 +441,31 @@ namespace Scripts.Spells.Azerite
}
}
[Script] // 288882 - Hour of Reaping
class spell_item_hour_of_reaping : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.DHSoulBarrier);
}
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
{
return GetStackAmount() == GetAura().CalcMaxStackAmount();
}
void TriggerSoulBarrier(AuraEffect aurEff, ProcEventInfo procInfo)
{
GetTarget().CastSpell(GetTarget(), SpellIds.DHSoulBarrier, new CastSpellExtraArgs(aurEff));
}
public override void Register()
{
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckProc, 0, AuraType.Dummy));
AfterEffectProc.Add(new EffectProcHandler(TriggerSoulBarrier, 0, AuraType.Dummy));
}
}
[Script] // 277253 - Heart of Azeroth
class spell_item_heart_of_azeroth : AuraScript
{
+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));
}
}
}