From bfffd82e464d826738ae598420eff91cba3ebc79 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 23:12:02 -0400 Subject: [PATCH] Core/Scripts: implemented Seed of Corruption scaling damage tolerance Port From (https://github.com/TrinityCore/TrinityCore/commit/e9ddf644b0c9075e637089601d70eb8adcf5654a) --- Source/Scripts/Spells/Warlock.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Scripts/Spells/Warlock.cs b/Source/Scripts/Spells/Warlock.cs index 13bf1c741..0b87d865d 100644 --- a/Source/Scripts/Spells/Warlock.cs +++ b/Source/Scripts/Spells/Warlock.cs @@ -364,6 +364,15 @@ namespace Scripts.Spells.Warlock return ValidateSpellInfo(SpellIds.SeedOfCorruptionDamage); } + void CalculateBuffer(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated) + { + Unit caster = GetCaster(); + if (caster == null) + return; + + amount = caster.SpellBaseDamageBonusDone(GetSpellInfo().GetSchoolMask()) * GetSpellInfo().GetEffect(0).CalcValue(caster) / 100; + } + void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); @@ -390,7 +399,8 @@ namespace Scripts.Spells.Warlock public override void Register() { - OnEffectProc.Add(new EffectProcHandler(HandleProc, 1, AuraType.Dummy)); + DoEffectCalcAmount.Add(new EffectCalcAmountHandler(CalculateBuffer, 2, AuraType.Dummy)); + OnEffectProc.Add(new EffectProcHandler(HandleProc, 2, AuraType.Dummy)); } }