Core/Units: Implemented UNIT_VIS_FLAGS_INVISIBLE

Port From (https://github.com/TrinityCore/TrinityCore/commit/9653f96f9930c1c27bfec887bdbdc1a81b10babd)
This commit is contained in:
hondacrx
2023-01-04 16:30:14 -05:00
parent 4354475fb0
commit e8cc7572f8
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -270,8 +270,8 @@ namespace Framework.Constants
public enum UnitVisFlags
{
Unk1 = 0x01,
Creep = 0x02,
Invisible = 0x01,
Stealthed = 0x02,
Untrackable = 0x04,
Unk4 = 0x08,
Unk5 = 0x10,
+6 -2
View File
@@ -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);