Core/Auras: INVISIBILITY_UNK10 also applies the flag PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW (#27788)

This commit is contained in:
Meji
2022-04-17 22:09:58 +02:00
committed by GitHub
parent b73d031fe0
commit 230f40f359

View File

@@ -1374,7 +1374,7 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
if (apply)
{
// apply glow vision
if (target->GetTypeId() == TYPEID_PLAYER && type == INVISIBILITY_GENERAL)
if (target->GetTypeId() == TYPEID_PLAYER && (type == INVISIBILITY_GENERAL || type == INVISIBILITY_UNK10))
target->SetByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
target->m_invisibility.AddFlag(type);
@@ -1405,12 +1405,12 @@ 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);
// if not have invisibility auras of type INVISIBILITY_GENERAL or INVISIBILITY_UNK10
// remove glow vision
if (target->GetTypeId() == TYPEID_PLAYER && !target->m_invisibility.HasFlag(INVISIBILITY_GENERAL) && !target->m_invisibility.HasFlag(INVISIBILITY_UNK10))
target->RemoveByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
}
}