mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Core/Spell): PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW applies only with invisibility type INVISIBILITY_GENERAL (0) (#7863)
Co-Authored-By: Meji <2695278+meji46@users.noreply.github.com>
This commit is contained in:
@@ -1523,8 +1523,8 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
|
||||
if (apply)
|
||||
{
|
||||
// apply glow vision
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->SetByteFlag(PLAYER_FIELD_BYTES2, 3, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
|
||||
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);
|
||||
target->m_invisibility.AddValue(type, GetAmount());
|
||||
@@ -1534,7 +1534,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, 3, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW);
|
||||
|
||||
@@ -1553,7 +1553,16 @@ 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());
|
||||
@@ -5725,7 +5734,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->SetUInt16Value(PLAYER_FIELD_BYTES2, 0, overrideId);
|
||||
target->SetUInt16Value(PLAYER_FIELD_BYTES2, PLAYER_BYTES_2_OVERRIDE_SPELLS_UINT16_OFFSET, overrideId);
|
||||
if (OverrideSpellDataEntry const* overrideSpells = sOverrideSpellDataStore.LookupEntry(overrideId))
|
||||
for (uint8 i = 0; i < MAX_OVERRIDE_SPELL; ++i)
|
||||
if (uint32 spellId = overrideSpells->spellId[i])
|
||||
@@ -5733,7 +5742,7 @@ void AuraEffect::HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 m
|
||||
}
|
||||
else
|
||||
{
|
||||
target->SetUInt16Value(PLAYER_FIELD_BYTES2, 0, 0);
|
||||
target->SetUInt16Value(PLAYER_FIELD_BYTES2, PLAYER_BYTES_2_OVERRIDE_SPELLS_UINT16_OFFSET, 0);
|
||||
if (OverrideSpellDataEntry const* overrideSpells = sOverrideSpellDataStore.LookupEntry(overrideId))
|
||||
for (uint8 i = 0; i < MAX_OVERRIDE_SPELL; ++i)
|
||||
if (uint32 spellId = overrideSpells->spellId[i])
|
||||
|
||||
Reference in New Issue
Block a user