Jump to content

Fix for IsNoStackAuraDueToAura function


Auntie Mangos

Recommended Posts

  • 40 years later...

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

The IsNoStackAuraDueToAura function currently compares also default spell effect values (ie. all values = 0), so it is always evaluated as "true" if both compared spells have less than 3 effects. This also causes most of guardian and battle elixir to overwrite even if they shouldn't.

For which repository revision was the patch created?

10301

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

No.

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

me

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index ebb9818..f023122 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -305,7 +305,11 @@ bool IsNoStackAuraDueToAura(uint32 spellId_1, uint32 spellId_2)
            if (spellInfo_1->Effect[i] == spellInfo_2->Effect[j]
                && spellInfo_1->EffectApplyAuraName[i] == spellInfo_2->EffectApplyAuraName[j]
                && spellInfo_1->EffectMiscValue[i] == spellInfo_2->EffectMiscValue[j]
-                && spellInfo_1->EffectItemType[i] == spellInfo_2->EffectItemType[j])
+                && spellInfo_1->EffectItemType[i] == spellInfo_2->EffectItemType[j]
+                && (spellInfo_1->Effect[i] != 0
+                || spellInfo_1->EffectApplyAuraName[i] != 0
+                || spellInfo_1->EffectMiscValue[i] != 0
+                || spellInfo_1->EffectItemType[i] != 0))
                return true;
        }
    }

Pastebin link: http://pastebin.org/436664

Link to comment
Share on other sites

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