@@ -9949,11 +9949,15 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
99499949 DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
99509950 }
99519951
9952- // Done Percentage for DOT is already calculated, no need to do it again. The percentage mod is applied in Aura::HandleAuraSpecificMods.
9953- float tmpDamage = (int32(pdamage) + DoneTotal) * (damagetype == DOT ? 1.0f : SpellDamagePctDone(victim, spellProto, damagetype));
9954- // apply spellmod to Done damage (flat and pct)
9955- if (Player* modOwner = GetSpellModOwner())
9956- modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, tmpDamage);
9952+ float tmpDamage = float(int32(pdamage) + DoneTotal);
9953+ // SPELLMOD_DOT will be applied in AuraEffect::HandlePeriodicDamageAurasTick.
9954+ if (damagetype != DOT)
9955+ {
9956+ tmpDamage *= SpellDamagePctDone(victim, spellProto, damagetype);
9957+ // apply spellmod to Done damage (flat and pct)
9958+ if (Player* modOwner = GetSpellModOwner())
9959+ modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, tmpDamage);
9960+ }
99579961
99589962 return uint32(std::max(tmpDamage, 0.0f));
99599963}
@@ -10793,11 +10797,15 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
1079310797 DoneTotal = 0;
1079410798 }
1079510799
10796- // Done Percentage for DOT is already calculated, no need to do it again. The percentage mod is applied in Aura::HandleAuraSpecificMods.
10797- float heal = float(int32(healamount) + DoneTotal) * (damagetype == DOT ? 1.0f : SpellHealingPctDone(victim, spellProto));
10798- // apply spellmod to Done amount
10799- if (Player* modOwner = GetSpellModOwner())
10800- modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, heal);
10800+ float heal = float(int32(healamount) + DoneTotal);
10801+ // SPELLMOD_DOT will be applied in AuraEffect::HandlePeriodicHealAurasTick.
10802+ if (damagetype != DOT)
10803+ {
10804+ heal *= SpellHealingPctDone(victim, spellProto);
10805+ // apply spellmod to Done amount
10806+ if (Player* modOwner = GetSpellModOwner())
10807+ modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_DAMAGE, heal);
10808+ }
1080110809
1080210810 return uint32(std::max(heal, 0.0f));
1080310811}
0 commit comments