diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index 6928a0424..83c4fca50 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -375,7 +375,7 @@ namespace Framework.Constants ModCurrencyCategoryGainPct = 351, //NYI Unk352 = 352, ModCamouflage = 353, // Nyi - ModHealingDonePctVersusTargetHealth = 354, // NYI Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing) + ModHealingDonePctVersusTargetHealth = 354, // Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing) ModCastingSpeed = 355, // NYI ProvideTotemCategory = 356, EnableBoss1UnitFrame = 357, diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index d155a64c6..8155e9fb6 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -533,6 +533,12 @@ namespace Game.Entities // Healing done percent DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingDonePercent); + // bonus from missing health of target + float healthPctDiff = 100.0f - victim.GetHealthPct(); + foreach (AuraEffect healingDonePctVsTargetHealth in GetAuraEffectsByType(AuraType.ModHealingDonePctVersusTargetHealth)) + if (healingDonePctVsTargetHealth.IsAffectingSpell(spellProto)) + MathFunctions.AddPct(ref DoneTotalMod, MathFunctions.CalculatePct((float)healingDonePctVsTargetHealth.GetAmount(), healthPctDiff)); + return DoneTotalMod; }