mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #378 from SheepGoMeh/master
Add StatusFlags to Chara
This commit is contained in:
commit
8161fafc9e
4 changed files with 69 additions and 1 deletions
56
Dalamud/Game/ClientState/Actors/StatusFlags.cs
Normal file
56
Dalamud/Game/ClientState/Actors/StatusFlags.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Actors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Enum describing possible status flags.
|
||||||
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
|
public enum StatusFlags : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No status flags set.
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hostile actor.
|
||||||
|
/// </summary>
|
||||||
|
Hostile = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor in combat.
|
||||||
|
/// </summary>
|
||||||
|
InCombat = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor weapon is out.
|
||||||
|
/// </summary>
|
||||||
|
WeaponOut = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor offhand is out.
|
||||||
|
/// </summary>
|
||||||
|
OffhandOut = 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor is a party member.
|
||||||
|
/// </summary>
|
||||||
|
PartyMember = 16,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor is a alliance member.
|
||||||
|
/// </summary>
|
||||||
|
AllianceMember = 32,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor is in friend list.
|
||||||
|
/// </summary>
|
||||||
|
Friend = 64,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor is casting.
|
||||||
|
/// </summary>
|
||||||
|
IsCasting = 128,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -76,5 +76,10 @@ namespace Dalamud.Game.ClientState.Actors.Types
|
||||||
/// Indexed by <see cref="CustomizeIndex"/>.
|
/// Indexed by <see cref="CustomizeIndex"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] Customize => this.ActorStruct.Customize;
|
public byte[] Customize => this.ActorStruct.Customize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets status Effects.
|
||||||
|
/// </summary>
|
||||||
|
public StatusFlags StatusFlags => this.ActorStruct.StatusFlags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,12 @@ namespace Dalamud.Game.ClientState.Structs
|
||||||
[FieldOffset(ActorOffsets.TotalCastTime)]
|
[FieldOffset(ActorOffsets.TotalCastTime)]
|
||||||
public float TotalCastTime;
|
public float TotalCastTime;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actor status flags.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(ActorOffsets.StatusFlags)]
|
||||||
|
public StatusFlags StatusFlags;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The array of status effects that the actor is currently affected by.
|
/// The array of status effects that the actor is currently affected by.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -284,6 +290,7 @@ namespace Dalamud.Game.ClientState.Structs
|
||||||
public const int CurrentCastTargetActorId = 0x1B90;
|
public const int CurrentCastTargetActorId = 0x1B90;
|
||||||
public const int CurrentCastTime = 0x1BB4;
|
public const int CurrentCastTime = 0x1BB4;
|
||||||
public const int TotalCastTime = 0x1BB8;
|
public const int TotalCastTime = 0x1BB8;
|
||||||
|
public const int StatusFlags = 0x19A0;
|
||||||
public const int UIStatusEffects = 0x19F8;
|
public const int UIStatusEffects = 0x19F8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -696,7 +696,7 @@ namespace Dalamud.Interface
|
||||||
if (actor is Chara chara)
|
if (actor is Chara chara)
|
||||||
{
|
{
|
||||||
actorString +=
|
actorString +=
|
||||||
$" Level: {chara.Level} ClassJob: {(this.resolveGameData ? chara.ClassJob.GameData.Name : chara.ClassJob.Id.ToString())} CHP: {chara.CurrentHp} MHP: {chara.MaxHp} CMP: {chara.CurrentMp} MMP: {chara.MaxMp}\n Customize: {BitConverter.ToString(chara.Customize).Replace("-", " ")}\n";
|
$" Level: {chara.Level} ClassJob: {(this.resolveGameData ? chara.ClassJob.GameData.Name : chara.ClassJob.Id.ToString())} CHP: {chara.CurrentHp} MHP: {chara.MaxHp} CMP: {chara.CurrentMp} MMP: {chara.MaxMp}\n Customize: {BitConverter.ToString(chara.Customize).Replace("-", " ")} StatusFlags: {chara.StatusFlags}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor is PlayerCharacter pc)
|
if (actor is PlayerCharacter pc)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue