fix(Core/Auras): INVISIBILITY_UNK10 also applies the flag PLAYER_FIELD_BYTE… (#11588)
* ore/Auras: INVISIBILITY_UNK10 also applies the flag PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/230f40f359c80b102f344ed55adc12f246a97051) Co-Authored-By: Meji <2695278+meji46@users.noreply.github.com> * Update Object.h * Update Object.h Co-authored-by: Meji <2695278+meji46@users.noreply.github.com>
This commit is contained in:
@@ -1537,7 +1537,7 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
|
|||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
// apply glow vision
|
// 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->SetByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
|
||||||
|
|
||||||
target->m_invisibility.AddFlag(type);
|
target->m_invisibility.AddFlag(type);
|
||||||
@@ -1568,14 +1568,14 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
|
|||||||
}
|
}
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
|
target->m_invisibility.DelFlag(type);
|
||||||
|
|
||||||
// if not have invisibility auras of type INVISIBILITY_GENERAL
|
// if not have invisibility auras of type INVISIBILITY_GENERAL
|
||||||
// remove glow vision
|
// remove glow vision
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER && type == INVISIBILITY_GENERAL)
|
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);
|
target->RemoveByteFlag(PLAYER_FIELD_BYTES2, PLAYER_FIELD_BYTES_2_OFFSET_AURA_VISION, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
target->m_invisibility.DelFlag(type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user