Jump to content

[patch] Doing Damage Should Not Remove Invisibility Aura


Guest megamage

Recommended Posts

Invisibility aura should only be removed by aura_interrupt_type, but not dealing damage.

Example:

spell 44801 and 46021

These spells make a boss and players invisible, only so only invisible players can fight the boss, other boss or players cannot join the fight. However, now when players hit the boss, or boss hit the players, they are not invisible.

Index: Unit.cpp
===================================================================
--- Unit.cpp        (revision 6346)
+++ Unit.cpp        (working copy)
@@ -464,8 +490,8 @@
                RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
                RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

-                if(pVictim != this)
-                        RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY);
+                //if(pVictim != this)
+                //        RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY);

                if(pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->IsStandState() && !pVictim->hasUnitState(UNIT_STAT_STUNDED))
                        pVictim->SetStandState(PLAYER_STATE_NONE);
Index: Creature.cpp
===================================================================
--- Creature.cpp        (revision 6346)
+++ Creature.cpp        (working copy)
@@ -1722,6 +1724,9 @@
        if(!pVictim->isInAccessablePlaceFor(this))
                return true;

+        if(pVictim->GetVisibility() != VISIBILITY_ON && !(m_invisibilityMask & pVictim->m_invisibilityMask) && !canDetectInvisibilityOf(pVictim))
+                return true;
+
        // we not need get instance map, base map provide all info
        if(MapManager::Instance().GetBaseMap(GetMapId())->Instanceable())
                return false;

Link to comment
Share on other sites

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