Jump to content

[patch]Typo in Spell Deflection


Guest tehmarto

Recommended Posts

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

When i debugged i saw spells to have SPELL_DIRECT_DAMAGE but not DIRECT_DAMAGE. So when i changed it spell deflection started working

For which repository revision was the patch created?

Works with 9842.

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

Don't find.

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

Me.

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f510fc0..6cced83 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1931,11 +1934,11 @@ void Unit::CalculateAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolMask, D
                }
                // Spell Deflection
                if (spellProto->SpellIconID == 3006)
                {
                    // You have a chance equal to your Parry chance
-                    if (damagetype == DIRECT_DAMAGE &&                   // Only for direct damage
+                    if (damagetype == SPELL_DIRECT_DAMAGE &&                   // Only for direct damage
                        roll_chance_f(GetUnitParryChance()))             // Roll chance
                        RemainingDamage -= RemainingDamage * currentAbsorb / 100;
                    continue;
                }
                // Reflective Shield (Lady Malande boss)

Link to comment
Share on other sites

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