From 2957ad18c4edfcbfd98d9242c5fa16a70bb4e6e7 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 30 Jun 2023 08:45:12 -0400 Subject: [PATCH] Scripts/DK: Fix Death Pact heal absorb amount Port From (https://github.com/TrinityCore/TrinityCore/commit/3d0831e80a39e51804af50b764198a3c1d850aad) --- Source/Scripts/Spells/DeathKnight.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Scripts/Spells/DeathKnight.cs b/Source/Scripts/Spells/DeathKnight.cs index e87a1a9d7..0eda7a9e4 100644 --- a/Source/Scripts/Spells/DeathKnight.cs +++ b/Source/Scripts/Spells/DeathKnight.cs @@ -399,11 +399,16 @@ namespace Scripts.Spells.DeathKnight [Script] // 48743 - Death Pact class spell_dk_death_pact : AuraScript { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellEffect((spellInfo.Id, 2)); + } + void HandleCalcAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated) { Unit caster = GetCaster(); if (caster) - amount = (int)caster.CountPctFromMaxHealth(amount); + amount = (int)caster.CountPctFromMaxHealth(GetEffectInfo(2).CalcValue(caster)); } public override void Register()