diff --git a/Dalamud/Game/ClientState/Actors/StatusFlags.cs b/Dalamud/Game/ClientState/Actors/StatusFlags.cs new file mode 100644 index 000000000..ea9ef840a --- /dev/null +++ b/Dalamud/Game/ClientState/Actors/StatusFlags.cs @@ -0,0 +1,51 @@ +using System; + +namespace Dalamud.Game.ClientState.Actors +{ + /// + /// Enum describing possible status flags. + /// + [Flags] + public enum StatusFlags : byte + { + /// + /// No status flags set. + /// + None = 0, + + /// + /// Hostile actor. + /// + Hostile = 1, + + /// + /// Actor in combat. + /// + InCombat = 2, + + /// + /// Actor weapon is out. + /// + WeaponOut = 4, + + /// + /// Actor is a party member. + /// + PartyMember = 16, + + /// + /// Actor is a alliance member. + /// + AllianceMember = 32, + + /// + /// Actor is in friend list. + /// + Friend = 64, + + /// + /// Actor is casting. + /// + IsCasting = 128, + } +} diff --git a/Dalamud/Game/ClientState/Actors/Types/Chara.cs b/Dalamud/Game/ClientState/Actors/Types/Chara.cs index 01e4ba243..73875d80c 100644 --- a/Dalamud/Game/ClientState/Actors/Types/Chara.cs +++ b/Dalamud/Game/ClientState/Actors/Types/Chara.cs @@ -76,5 +76,10 @@ namespace Dalamud.Game.ClientState.Actors.Types /// Indexed by . /// public byte[] Customize => this.ActorStruct.Customize; + + /// + /// Gets status Effects. + /// + public StatusFlags StatusFlags => this.ActorStruct.StatusFlags; } } diff --git a/Dalamud/Game/ClientState/Structs/Actor.cs b/Dalamud/Game/ClientState/Structs/Actor.cs index e765a8c4c..6f882f6f9 100644 --- a/Dalamud/Game/ClientState/Structs/Actor.cs +++ b/Dalamud/Game/ClientState/Structs/Actor.cs @@ -231,6 +231,12 @@ namespace Dalamud.Game.ClientState.Structs [FieldOffset(ActorOffsets.TotalCastTime)] public float TotalCastTime; + /// + /// Actor status flags. + /// + [FieldOffset(ActorOffsets.StatusFlags)] + public StatusFlags StatusFlags; + /// /// The array of status effects that the actor is currently affected by. /// @@ -284,6 +290,7 @@ namespace Dalamud.Game.ClientState.Structs public const int CurrentCastTargetActorId = 0x1B90; public const int CurrentCastTime = 0x1BB4; public const int TotalCastTime = 0x1BB8; + public const int StatusFlags = 0x19A0; public const int UIStatusEffects = 0x19F8; } }