Jump to content

[fix] typo in invisibility aura handlers


darkstalker

Recommended Posts

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

fixes a typo in invisibility and detect invisibility aura handlers that can cause incorrect aura remove effect.

* For which repository revision was the patch created?

10432

* 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.

darkstalker

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 59d5192..92e449d 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3936,7 +3936,7 @@ void Aura::HandleInvisibility(bool apply, bool Real)
        target->m_invisibilityMask = 0;
        Unit::AuraList const& auras = target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY);
        for(Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
-            target->m_invisibilityMask |= (1 << m_modifier.m_miscvalue);
+            target->m_invisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue);

        // only at real aura remove and if not have different invisibility auras.
        if(Real && target->m_invisibilityMask == 0)
@@ -3970,7 +3970,7 @@ void Aura::HandleInvisibilityDetect(bool apply, bool Real)
        target->m_detectInvisibilityMask = 0;
        Unit::AuraList const& auras = target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION);
        for(Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
-            target->m_detectInvisibilityMask |= (1 << m_modifier.m_miscvalue);
+            target->m_detectInvisibilityMask |= (1 << (*itr)->GetModifier()->m_miscvalue);
    }
    if(Real && target->GetTypeId()==TYPEID_PLAYER)
        ((Player*)target)->GetCamera().UpdateVisibilityForOwner();

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