aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 1bdb4c64437..86b6b42f455 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1426,12 +1426,13 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
return;
Unit* target = aurApp->GetTarget();
+ Player* playerTarget = target->ToPlayer();
InvisibilityType type = InvisibilityType(GetMiscValue());
if (apply)
{
// apply glow vision
- if (Player* playerTarget = target->ToPlayer())
+ if (playerTarget && type == INVISIBILITY_GENERAL)
playerTarget->AddAuraVision(PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
target->m_invisibility.AddFlag(type);
@@ -1442,7 +1443,7 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
if (!target->HasAuraType(SPELL_AURA_MOD_INVISIBILITY))
{
// if not have different invisibility auras.
- // remove glow vision
+ // always remove glow vision
if (Player * playerTarget = target->ToPlayer())
playerTarget->RemoveAuraVision(PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
@@ -1461,7 +1462,14 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
}
}
if (!found)
+ {
+ // if not have invisibility auras of type INVISIBILITY_GENERAL
+ // remove glow vision
+ if (playerTarget && type == INVISIBILITY_GENERAL)
+ playerTarget->RemoveAuraVision(PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
+
target->m_invisibility.DelFlag(type);
+ }
}
target->m_invisibility.AddValue(type, -GetAmount());