Jump to content

[9851][Bug] Dampen Magic vs Seal of Righteousness


Auntie Mangos

Recommended Posts

  • 40 years later...

mangos: 9851

database: UDB 390

ACID: 3.0.4

http://www.wowhead.com/spell=21084

http://www.wowhead.com/spell=33944

How it should work:

dampen magic should decrease magic damage taken by certain amount

How it is working now: in specific circumstances (see how to reproduce part), this combination of spells deals huge damage

How to reproduce:

1) Take 2 characters, I was able to reproduce it with this combination:

lvl 80 mage and lvl 1 paladin

2) with paladin, cast Seal of Righteousness

3) with mage, cast Dampen Magic (rank 6) on mage

4) with paladin, attack mage -> BOOM mage is killed for about 4 million damage from seal of righteousness

I was not able to reproduce with lvl 80 mage against lvl 80 paladin

It looks like damage decreasing for dampen magic is underflowing somewhere.

This bug is very old

Link to comment
Share on other sites

looks like happens because in line basepoints[0] = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000; - GetAttackTime is uint32 and if holy is negative it may not like * after

.maybe this should fix it :

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 98a55c2..f028171 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6282,8 +6282,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
            {
                triggered_spell_id = 25742;
                float ap = GetTotalAttackPowerValue(BASE_ATTACK);
-                int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) +
-                             pVictim->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_HOLY);
+                int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY);
+                if (holy < 0)
+                    holy = 0;
                basepoints[0] = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000;
                break;
            }
@@ -9307,7 +9308,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
        TakenTotal+= int32(TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty);
    }

-    float tmpDamage = (pdamage + TakenTotal * int32(stack)) * TakenTotalMod;
+    float tmpDamage = (int32(pdamage) + TakenTotal * int32(stack)) * TakenTotalMod;

    return tmpDamage > 0 ? uint32(tmpDamage) : 0;

SpellBaseDamageBonusTaken shouldnt be called because it's auras are used anyway in MeleeDamageBonusTaken

Link to comment
Share on other sites

Guest
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