aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2023-06-27 20:29:18 +0200
committerGitHub <noreply@github.com>2023-06-27 20:29:18 +0200
commit3d0831e80a39e51804af50b764198a3c1d850aad (patch)
tree40d06e1270719fd9b7111cedc7ac6b0eb55e8f69 /src
parent81f0bf9525cdf2e06b709a9c4259ba620138ebd0 (diff)
Scripts/DK: Fix Death Pact heal absorb amount (#29100)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp7
1 files changed, 6 insertions, 1 deletions
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