diff options
author | Meji <alvaromegias_46@hotmail.com> | 2021-07-17 18:32:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 18:32:47 +0200 |
commit | 47a4d58a982d5c22fbcdd07cac9dae5fd1bc52e4 (patch) | |
tree | 8556a1875614b093810c30284b3cf7bb8235ae2c /src | |
parent | 5094363a9432966b00b9fa79c0a353746cd24378 (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.cpp | 11 |
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()); |