Core/Auras: implemented SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee2ebfe87db6e43fc0ee2e27d760d656eadf9526)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user