Jump to content

[Fix] [8486] DispelEffect with Damage 0


Recommended Posts

Posted

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

Some spells have SPELL_EFFECT_DISPEL with a corresponding EffectDieSides and EffectBaseDice of 0. So Unit::CalculateSpellDamage is called and sets the "damage" of the effect to zero, resulting in Spell::EffectDispel removing no auras. I think damage should be set to a minimum of 1 for this spell effect.

For example, look at Cleansing Totem Effect, which still only works on dispelling disease. The first spell effect is for dispelling diseases, and it has a damage value of 1. The second effect, for dispelling poisons, has a damage value of 0, causing it to not dispel any poisons currently.

For which repository revision was the patch created?

8039

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

Me

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 1d673bf..09218a1 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3363,6 +3363,10 @@ void Spell::EffectDispel(uint32 i)
        std::list < std::Pair<uint32,uint64> > success_list;// (spell_id,casterGuid)
        std::list < uint32 > fail_list;                     // spell_id
        int32 list_size = dispel_list.size();
+
+        if(!damage)
+            damage = 1;
+
        // Dispell N = damage buffs (or while exist buffs for dispel)
        for (int32 count=0; count < damage && list_size > 0; ++count)
        {

  • 2 months 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