From e8cc7572f87a17ecd23490a00cd161223f23c152 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 4 Jan 2023 16:30:14 -0500 Subject: [PATCH] Core/Units: Implemented UNIT_VIS_FLAGS_INVISIBLE Port From (https://github.com/TrinityCore/TrinityCore/commit/9653f96f9930c1c27bfec887bdbdc1a81b10babd) --- Source/Framework/Constants/UnitConst.cs | 4 ++-- Source/Game/Spells/Auras/AuraEffect.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Framework/Constants/UnitConst.cs b/Source/Framework/Constants/UnitConst.cs index 8a44b35e2..7a86821db 100644 --- a/Source/Framework/Constants/UnitConst.cs +++ b/Source/Framework/Constants/UnitConst.cs @@ -270,8 +270,8 @@ namespace Framework.Constants public enum UnitVisFlags { - Unk1 = 0x01, - Creep = 0x02, + Invisible = 0x01, + Stealthed = 0x02, Untrackable = 0x04, Unk4 = 0x08, Unk5 = 0x10, diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index a397ca9a4..f31cf5968 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -968,6 +968,8 @@ namespace Game.Spells target.m_invisibility.AddFlag(type); target.m_invisibility.AddValue(type, GetAmount()); + + target.SetVisFlag(UnitVisFlags.Invisible); } else { @@ -1000,6 +1002,8 @@ namespace Game.Spells playerTarget.RemoveAuraVision(PlayerFieldByte2Flags.InvisibilityGlow); target.m_invisibility.DelFlag(type); + + target.RemoveVisFlag(UnitVisFlags.Invisible); } } @@ -1057,7 +1061,7 @@ namespace Game.Spells { target.m_stealth.AddFlag(type); target.m_stealth.AddValue(type, GetAmount()); - target.SetVisFlag(UnitVisFlags.Creep); + target.SetVisFlag(UnitVisFlags.Stealthed); Player playerTarget = target.ToPlayer(); if (playerTarget != null) playerTarget.AddAuraVision(PlayerFieldByte2Flags.Stealth); @@ -1070,7 +1074,7 @@ namespace Game.Spells { target.m_stealth.DelFlag(type); - target.RemoveVisFlag(UnitVisFlags.Creep); + target.RemoveVisFlag(UnitVisFlags.Stealthed); Player playerTarget = target.ToPlayer(); if (playerTarget != null) playerTarget.RemoveAuraVision(PlayerFieldByte2Flags.Stealth);