aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2021-02-21 15:39:14 +0100
committerShauren <shauren.trinity@gmail.com>2021-02-21 15:39:14 +0100
commit983e565650dd5e83ab4a346f715dc42221315cff (patch)
treeb4fe5945e948492178a90f742c8d8aac0f5d10e3 /src/server/game/Entities
parentc57b012ee4e75dfb4c3d29b6c5f2308ae559aec4 (diff)
Core/Auras: Restore old SPELL_AURA_MOD_HOT_PCT implementation from 3.3.5 branch
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index a4aded61cf7..5acafccd178 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7244,7 +7244,7 @@ float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const
return DoneTotalMod;
}
-uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType /*damagetype*/, SpellEffectInfo const* spellEffect, uint32 stack) const
+uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, SpellEffectInfo const* spellEffect, uint32 stack) const
{
float TakenTotalMod = 1.0f;
@@ -7301,6 +7301,18 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
TakenTotal += int32(TakenAdvertisedBenefit * coeff * stack);
}
+ if (damagetype == DOT)
+ {
+ // Healing over time taken percent
+ float minval_hot = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT));
+ if (minval_hot)
+ AddPct(TakenTotalMod, minval_hot);
+
+ float maxval_hot = float(GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT));
+ if (maxval_hot)
+ AddPct(TakenTotalMod, maxval_hot);
+ }
+
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_RECEIVED, [caster, spellProto](AuraEffect const* aurEff) -> bool
{
if (caster->GetGUID() == aurEff->GetCasterGUID() && aurEff->IsAffectingSpell(spellProto))