Jump to content

[fix][7504] Glyph of Dispel


Recommended Posts

Posted

2

- Adds the effect of Glyph of Dispel Magic

2

- rev. 7297 (Sorry, but our live server still uses this rev.)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index c572ec9..a5f89ee 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5126,6 +5126,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                    triggered_spell_id = 28810;
                    break;
                }
+                // Glyph of Dispel Magic
+                case 55677:
+                {
+                    if(!target->IsFriendlyTo(this))
+                        return false;
+
+                    basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
+                    triggered_spell_id = 56131;
+                    break;
+                }
            }
            break;
        }
@@ -11348,4 +11358,4 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
    if(IsInWorld())
        if(Pet* pet = GetPet())
            pet->SetPhaseMask(newPhaseMask,true);
-}
\\ No newline at end of file
+} 

Posted

Nice. Just one thing, why does the spell 56131 say it's 6%?

If it should be 6% (as spell tooltip says) i would use procSpell->EffectBasePoints[1] instead of 3 in the formula.

But maybe you noticed that there's some problem and know that 3% is correct...

Let me know :P

Posted

In my dbc (wich is actually for 3.0.8) EffectBasePoints[0] is 2, and [2] is 0. The spell says 6% and i think the bp0 is to divide that but it looks unnecessary, it looks to be better this way, probably not that dynamic, but better.

::Edit::

Modified '3' to 'triggerAmount' on multiple suggestions.

  • 2 weeks later...
×
×
  • 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