From 3d0831e80a39e51804af50b764198a3c1d850aad Mon Sep 17 00:00:00 2001 From: Aqua Deus <95978183+aquadeus@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:29:18 +0200 Subject: Scripts/DK: Fix Death Pact heal absorb amount (#29100) --- src/server/scripts/Spells/spell_dk.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/server/scripts/Spells') diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index d2e229b8bd1..b19fa275cc3 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -443,10 +443,15 @@ class spell_dk_death_pact : public AuraScript { PrepareAuraScript(spell_dk_death_pact); + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }); + } + void HandleCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* caster = GetCaster()) - amount = int32(caster->CountPctFromMaxHealth(amount)); + amount = int32(caster->CountPctFromMaxHealth(GetEffectInfo(EFFECT_2).CalcValue(caster))); } void Register() override -- cgit v1.2.3