aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeji <alvaromegias_46@hotmail.com>2021-07-17 18:32:47 +0200
committerGitHub <noreply@github.com>2021-07-17 18:32:47 +0200
commit47a4d58a982d5c22fbcdd07cac9dae5fd1bc52e4 (patch)
tree8556a1875614b093810c30284b3cf7bb8235ae2c /src
parent5094363a9432966b00b9fa79c0a353746cd24378 (diff)
Core/Spells: PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW applies only with invisibility type INVISIBILITY_GENERAL (0) (#26701)
* Core/Spells: PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW applies only with invisibility type INVISIBILITY_GENERAL (0) * Use enum
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 3dc138b3796..914e2a5f079 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1361,7 +1361,7 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
if (apply)
{
// apply glow vision
- if (target->GetTypeId() == TYPEID_PLAYER)
+ if (target->GetTypeId() == TYPEID_PLAYER && type == INVISIBILITY_GENERAL)
target->SetByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
target->m_invisibility.AddFlag(type);
@@ -1372,7 +1372,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 (target->GetTypeId() == TYPEID_PLAYER)
target->RemoveByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
@@ -1391,7 +1391,14 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
}
}
if (!found)
+ {
+ // if not have invisibility auras of type INVISIBILITY_GENERAL
+ // remove glow vision
+ if (target->GetTypeId() == TYPEID_PLAYER && type == INVISIBILITY_GENERAL)
+ target->RemoveByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
+
target->m_invisibility.DelFlag(type);
+ }
}
target->m_invisibility.AddValue(type, -GetAmount());