Scripts/DK: Fix Death Pact heal absorb amount

Port From (https://github.com/TrinityCore/TrinityCore/commit/3d0831e80a39e51804af50b764198a3c1d850aad)
This commit is contained in:
hondacrx
2023-06-30 08:45:12 -04:00
parent 1edb0d07d3
commit 2957ad18c4
+6 -1
View File
@@ -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()