Jump to content

[patch] Spellmod_spell_bonus_damage


Auntie Mangos
 Share

Recommended Posts

  • 38 years later...

SPELLMOD_SPELL_BONUS_DAMAGE mods seems to be mods to spell damage coefficient, not to spell damage bonus itselfs

This means for example that flat +20 SPELLMOD_SPELL_BONUS_DAMAGE mod increases spell damage contribution for instant spell from 0.42X to 0.62X

previously it did increase it to 0.42*1.2X which is only 0.504X

This affect mostly Empowered Arcane Missiles, talents like Empowered Fireball does nothing more, just because 1 + mod is same as 1*(1+mod)

Index: game/Unit.cpp
===================================================================
--- game/Unit.cpp        (revision 6405)
+++ game/Unit.cpp        (working copy)
@@ -7306,14 +7306,14 @@
        float LvlPenalty = CalculateLevelPenalty(spellProto);

        // Spellmod SpellDamage
-        float SpellModSpellDamage = 100.0f;
+        float CoefficientPtc = ((float)CastingTime/3500.0f)*DotFactor*100.0f;

        if(Player* modOwner = GetSpellModOwner())
-                modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_SPELL_BONUS_DAMAGE,SpellModSpellDamage);
+                modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_SPELL_BONUS_DAMAGE,CoefficientPtc);

-        SpellModSpellDamage /= 100.0f;
+        CoefficientPtc /= 100.0f;

-        float DoneActualBenefit = DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * SpellModSpellDamage * LvlPenalty;
+        float DoneActualBenefit = DoneAdvertisedBenefit * CoefficientPtc * LvlPenalty;
        float TakenActualBenefit = TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty;

        float tmpDamage = (float(pdamage)+DoneActualBenefit)*DoneTotalMod;
@@ -7638,14 +7638,14 @@
        float LvlPenalty = CalculateLevelPenalty(spellProto);

        // Spellmod SpellDamage
-        float SpellModSpellDamage = 100.0f;
+        float CoefficientPtc = ((float)CastingTime/3500.0f)*DotFactor*100.0f;

        if(Player* modOwner = GetSpellModOwner())
-                modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_SPELL_BONUS_DAMAGE,SpellModSpellDamage);
+                modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_SPELL_BONUS_DAMAGE,CoefficientPtc);

-        SpellModSpellDamage /= 100.0f;
+        CoefficientPtc /= 100.0f;

-        float ActualBenefit = (float)AdvertisedBenefit * ((float)CastingTime / 3500.0f) * DotFactor * SpellModSpellDamage * LvlPenalty;
+        float ActualBenefit = (float)AdvertisedBenefit * CoefficientPtc * LvlPenalty;

        // use float as more appropriate for negative values and percent applying
        float heal = healamount + ActualBenefit;

Link to comment
Share on other sites

-        float SpellModSpellDamage = 100.0f;
+        float CoefficientPtc = ((float)CastingTime/3500.0f)*DotFactor*100.0f;

I havean important Question: Is CastingTime the current casting time, or the default casting time?

Mages for example can reduce their spell cast time of e.g. Firebolt from 3500 to 3000ms. On offcial servers this had also reduced the spell damage bonus. This restriction has been removed lately, so a 3000ms Firebolt receives the same spell damage Bonus like it would be a 3500ms Firebolt.

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
  • 5 months later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • 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