Jump to content

[little fix] SPELLMOD_SPELL_BONUS_DAMAGE calculation

Auntie Mangos

Recommended Posts

What bug does the patch fix? What features does the patch add?

Fixes the "SPELLMOD_SPELL_BONUS_DAMAGE", which should rather be added to the default coefficient, than multiply it.

For example talent Empowered Corruption Rank 3 (Increases the damage of your Corruption spell by an amount equal to 36% of your spell power.) has value 6, meaning that every tick should take an additional 6% of spell power.

The default coefficient od Corruption is 0,2 per tick, after this modifier it should be 0,26.

According to the current formula, it is 0,2 * 1,06 = 0,212. This goes for all spells, using this modifier...

To confirm that, you may take a look at wowwiki, which says:

Corruption 20% (per tick) (26% with Empowered Corruption) (31% with Empowered Corruption & Everlasting Affliction)

For which repository revision was the patch created?

Rev. 9020

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

Found this:


Who has been writing this patch? Please include either forum user names or email addresses.

Me, reeshack

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3d17605..d59a2d4 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8754,7 +8754,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3

    float LvlPenalty = CalculateLevelPenalty(spellProto);
    // Spellmod SpellDamage
-    float SpellModSpellDamage = 100.0f;
+    float SpellModSpellDamage = 0.0f;
    if(Player* modOwner = GetSpellModOwner())
    SpellModSpellDamage /= 100.0f;
@@ -8771,7 +8771,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
        if (bonus->ap_bonus)
            DoneTotal += int32(bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack);

-        DoneTotal  += int32(DoneAdvertisedBenefit * coeff * SpellModSpellDamage);
+        DoneTotal  += int32(DoneAdvertisedBenefit * (coeff + SpellModSpellDamage));
        TakenTotal += int32(TakenAdvertisedBenefit * coeff);
    // Default calculation

Alternative (and better) patch by darkstalker:


Link to comment
Share on other sites

  • 39 years later...
This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use