mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 04:17:43 +01:00
53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
|
{
|
|
/// <summary>
|
|
/// In-memory SAM job gauge.
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
public struct SAMGauge
|
|
{
|
|
[FieldOffset(3)]
|
|
private byte kenki;
|
|
|
|
[FieldOffset(4)]
|
|
private byte meditationStacks;
|
|
|
|
[FieldOffset(5)]
|
|
private Sen sen;
|
|
|
|
/// <summary>
|
|
/// Gets the current amount of Kenki available.
|
|
/// </summary>
|
|
public byte Kenki => this.kenki;
|
|
|
|
/// <summary>
|
|
/// Gets the amount of Meditation stacks.
|
|
/// </summary>
|
|
public byte MeditationStacks => this.meditationStacks;
|
|
|
|
/// <summary>
|
|
/// Gets the active Sen.
|
|
/// </summary>
|
|
public Sen Sen => this.sen;
|
|
|
|
/// <summary>
|
|
/// Gets if the Setsu Sen is active.
|
|
/// </summary>
|
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
|
public bool HasSetsu() => (this.Sen & Sen.SETSU) != 0;
|
|
|
|
/// <summary>
|
|
/// Gets if the Getsu Sen is active.
|
|
/// </summary>
|
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
|
public bool HasGetsu() => (this.Sen & Sen.GETSU) != 0;
|
|
|
|
/// <summary>
|
|
/// Gets if the Ka Sen is active.
|
|
/// </summary>
|
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
|
public bool HasKa() => (this.Sen & Sen.KA) != 0;
|
|
}
|
|
}
|