Break JobGauges

This commit is contained in:
Raymond 2021-07-14 16:12:06 -04:00
parent c0ab271892
commit c3dfe0eb31
16 changed files with 207 additions and 147 deletions

View file

@ -8,35 +8,43 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct BLMGauge public struct BLMGauge
{ {
/// <summary>
/// Gets the time until the next Polyglot stack in milliseconds.
/// </summary>
[FieldOffset(0)] [FieldOffset(0)]
public short TimeUntilNextPolyglot; // enochian timer private short timeUntilNextPolyglot; // enochian timer
/// <summary>
/// Gets the time remaining for Astral Fire or Umbral Ice in milliseconds.
/// </summary>
[FieldOffset(2)] [FieldOffset(2)]
public short ElementTimeRemaining; // umbral ice and astral fire timer private short elementTimeRemaining; // umbral ice and astral fire timer
[FieldOffset(4)] [FieldOffset(4)]
private byte elementStance; // umbral ice or astral fire private byte elementStance; // umbral ice or astral fire
/// <summary>
/// Gets the number of Umbral Hearts remaining.
/// </summary>
[FieldOffset(5)] [FieldOffset(5)]
public byte NumUmbralHearts; private byte numUmbralHearts;
[FieldOffset(6)]
private byte numPolyglotStacks;
[FieldOffset(7)]
private byte enochianState;
/// <summary>
/// Gets the time until the next Polyglot stack in milliseconds.
/// </summary>
public short TimeUntilNextPolyglot => this.timeUntilNextPolyglot;
/// <summary>
/// Gets the time remaining for Astral Fire or Umbral Ice in milliseconds.
/// </summary>
public short ElementTimeRemaining => this.elementTimeRemaining;
/// <summary> /// <summary>
/// Gets the number of Polyglot stacks remaining. /// Gets the number of Polyglot stacks remaining.
/// </summary> /// </summary>
[FieldOffset(6)] public byte NumPolyglotStacks => this.numPolyglotStacks;
public byte NumPolyglotStacks;
[FieldOffset(7)] /// <summary>
private byte enochianState; /// Gets the number of Umbral Hearts remaining.
/// </summary>
public byte NumUmbralHearts => this.numUmbralHearts;
/// <summary> /// <summary>
/// Gets if the player is in Umbral Ice. /// Gets if the player is in Umbral Ice.

View file

@ -8,28 +8,36 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct BRDGauge public struct BRDGauge
{ {
[FieldOffset(0)]
private short songTimer;
[FieldOffset(2)]
private byte numSongStacks;
[FieldOffset(3)]
private byte soulVoiceValue;
[FieldOffset(4)]
private CurrentSong activeSong;
/// <summary> /// <summary>
/// Gets the current song timer in milliseconds. /// Gets the current song timer in milliseconds.
/// </summary> /// </summary>
[FieldOffset(0)] public short SongTimer => this.songTimer;
public short SongTimer;
/// <summary> /// <summary>
/// Gets the number of stacks for the current song. /// Gets the number of stacks for the current song.
/// </summary> /// </summary>
[FieldOffset(2)] public byte NumSongStacks => this.numSongStacks;
public byte NumSongStacks;
/// <summary> /// <summary>
/// Gets the amount of Soul Voice accumulated. /// Gets the amount of Soul Voice accumulated.
/// </summary> /// </summary>
[FieldOffset(3)] public byte SoulVoiceValue => this.soulVoiceValue;
public byte SoulVoiceValue;
/// <summary> /// <summary>
/// Gets the type of song that is active. /// Gets the type of song that is active.
/// </summary> /// </summary>
[FieldOffset(4)] public CurrentSong ActiveSong => this.activeSong;
public CurrentSong ActiveSong;
} }
} }

View file

@ -8,26 +8,32 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public unsafe struct DNCGauge public unsafe struct DNCGauge
{ {
/// <summary>
/// Gets the number of feathers available.
/// </summary>
[FieldOffset(0)] [FieldOffset(0)]
public byte NumFeathers; private byte numFeathers;
/// <summary>
/// Gets the amount of Espirit available.
/// </summary>
[FieldOffset(1)] [FieldOffset(1)]
public byte Esprit; private byte esprit;
[FieldOffset(2)] [FieldOffset(2)]
private fixed byte stepOrder[4]; private fixed byte stepOrder[4];
[FieldOffset(6)]
private byte numCompleteSteps;
/// <summary>
/// Gets the number of feathers available.
/// </summary>
public byte NumFeathers => this.numFeathers;
/// <summary>
/// Gets the amount of Espirit available.
/// </summary>
public byte Esprit => this.esprit;
/// <summary> /// <summary>
/// Gets the number of steps completed for the current dance. /// Gets the number of steps completed for the current dance.
/// </summary> /// </summary>
[FieldOffset(6)] public byte NumCompleteSteps => this.numCompleteSteps;
public byte NumCompleteSteps;
/// <summary> /// <summary>
/// Gets the next step in the current dance. /// Gets the next step in the current dance.

View file

@ -8,22 +8,28 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct DRGGauge public struct DRGGauge
{ {
[FieldOffset(0)]
private short botdTimer;
[FieldOffset(2)]
private BOTDState botdState;
[FieldOffset(3)]
private byte eyeCount;
/// <summary> /// <summary>
/// Gets the time remaining for Blood of the Dragon in milliseconds. /// Gets the time remaining for Blood of the Dragon in milliseconds.
/// </summary> /// </summary>
[FieldOffset(0)] public short BOTDTimer => this.botdTimer;
public short BOTDTimer;
/// <summary> /// <summary>
/// Gets the current state of Blood of the Dragon. /// Gets the current state of Blood of the Dragon.
/// </summary> /// </summary>
[FieldOffset(2)] public BOTDState BOTDState => this.botdState;
public BOTDState BOTDState;
/// <summary> /// <summary>
/// Gets the count of eyes opened during Blood of the Dragon. /// Gets the count of eyes opened during Blood of the Dragon.
/// </summary> /// </summary>
[FieldOffset(3)] public byte EyeCount => this.eyeCount;
public byte EyeCount;
} }
} }

View file

@ -8,26 +8,32 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct DRKGauge public struct DRKGauge
{ {
/// <summary>
/// Gets the amount of blood accumulated.
/// </summary>
[FieldOffset(0)] [FieldOffset(0)]
public byte Blood; private byte blood;
/// <summary>
/// Gets the Darkside time remaining in milliseconds.
/// </summary>
[FieldOffset(2)] [FieldOffset(2)]
public ushort DarksideTimeRemaining; private ushort darksideTimeRemaining;
[FieldOffset(4)] [FieldOffset(4)]
private byte darkArtsState; private byte darkArtsState;
[FieldOffset(6)]
private ushort shadowTimeRemaining;
/// <summary>
/// Gets the amount of blood accumulated.
/// </summary>
public byte Blood => this.blood;
/// <summary>
/// Gets the Darkside time remaining in milliseconds.
/// </summary>
public ushort DarksideTimeRemaining => this.darksideTimeRemaining;
/// <summary> /// <summary>
/// Gets the Shadow time remaining in milliseconds. /// Gets the Shadow time remaining in milliseconds.
/// </summary> /// </summary>
[FieldOffset(6)] public ushort ShadowTimeRemaining => this.shadowTimeRemaining;
public ushort ShadowTimeRemaining;
/// <summary> /// <summary>
/// Gets if the player has Dark Arts or not. /// Gets if the player has Dark Arts or not.

View file

@ -8,22 +8,28 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct GNBGauge public struct GNBGauge
{ {
[FieldOffset(0)]
private byte numAmmo;
[FieldOffset(2)]
private short maxTimerDuration;
[FieldOffset(4)]
private byte ammoComboStepNumber;
/// <summary> /// <summary>
/// Gets the amount of ammo available. /// Gets the amount of ammo available.
/// </summary> /// </summary>
[FieldOffset(0)] public byte NumAmmo => this.numAmmo;
public byte NumAmmo;
/// <summary> /// <summary>
/// Gets the max combo time of the Gnashing Fang combo. /// Gets the max combo time of the Gnashing Fang combo.
/// </summary> /// </summary>
[FieldOffset(2)] public short MaxTimerDuration => this.maxTimerDuration;
public short MaxTimerDuration;
/// <summary> /// <summary>
/// Gets the current step of the Gnashing Fang combo. /// Gets the current step of the Gnashing Fang combo.
/// </summary> /// </summary>
[FieldOffset(4)] public byte AmmoComboStepNumber => this.ammoComboStepNumber;
public byte AmmoComboStepNumber;
} }
} }

View file

@ -8,38 +8,48 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct MCHGauge public struct MCHGauge
{ {
[FieldOffset(0)]
private short overheatTimeRemaining;
[FieldOffset(2)]
private short robotTimeRemaining;
[FieldOffset(4)]
private byte heat;
[FieldOffset(5)]
private byte battery;
[FieldOffset(6)]
private byte lastRobotBatteryPower;
[FieldOffset(7)]
private byte timerActive;
/// <summary> /// <summary>
/// Gets the time time remaining for Overheat in milliseconds. /// Gets the time time remaining for Overheat in milliseconds.
/// </summary> /// </summary>
[FieldOffset(0)] public short OverheatTimeRemaining => this.overheatTimeRemaining;
public short OverheatTimeRemaining;
/// <summary> /// <summary>
/// Gets the time remaining for the Rook or Queen in milliseconds. /// Gets the time remaining for the Rook or Queen in milliseconds.
/// </summary> /// </summary>
[FieldOffset(2)] public short RobotTimeRemaining => this.robotTimeRemaining;
public short RobotTimeRemaining;
/// <summary> /// <summary>
/// Gets the current Heat level. /// Gets the current Heat level.
/// </summary> /// </summary>
[FieldOffset(4)] public byte Heat => this.heat;
public byte Heat;
/// <summary> /// <summary>
/// Gets the current Battery level. /// Gets the current Battery level.
/// </summary> /// </summary>
[FieldOffset(5)] public byte Battery => this.battery;
public byte Battery;
/// <summary> /// <summary>
/// Gets the battery level of the last Robot. /// Gets the battery level of the last Robot.
/// </summary> /// </summary>
[FieldOffset(6)] public byte LastRobotBatteryPower => this.lastRobotBatteryPower;
public byte LastRobotBatteryPower;
[FieldOffset(7)]
private byte timerActive;
/// <summary> /// <summary>
/// Gets if the player is currently Overheated. /// Gets if the player is currently Overheated.

View file

@ -1,4 +1,3 @@
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Structs.JobGauge namespace Dalamud.Game.ClientState.Structs.JobGauge
@ -9,35 +8,12 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct MNKGauge public struct MNKGauge
{ {
[FieldOffset(0)]
private byte numChakra;
/// <summary> /// <summary>
/// Gets the number of Chakra available. /// Gets the number of Chakra available.
/// </summary> /// </summary>
[FieldOffset(0)] public byte NumChakra => this.numChakra;
public byte NumChakra;
/// <summary>
/// Gets the Greased Lightning timer in milliseconds.
/// </summary>
[Obsolete("GL has been removed from the game")]
[FieldOffset(0)]
public byte GLTimer;
/// <summary>
/// Gets the amount of Greased Lightning stacks.
/// </summary>
[Obsolete("GL has been removed from the game")]
[FieldOffset(2)]
public byte NumGLStacks;
[Obsolete("GL has been removed from the game")]
[FieldOffset(4)]
private byte glTimerFreezeState;
/// <summary>
/// Gets if the Greased Lightning timer has been frozen.
/// </summary>
/// <returns>><c>true</c> or <c>false</c>.</returns>
[Obsolete("GL has been removed from the game")]
public bool IsGLTimerFroze() => false;
} }
} }

View file

@ -9,30 +9,28 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct NINGauge public struct NINGauge
{ {
[FieldOffset(0)]
private int hutonTimeLeft;
[FieldOffset(4)]
private byte ninki;
[FieldOffset(5)]
private byte numHutonManualCasts;
/// <summary> /// <summary>
/// Gets the time left on Huton in milliseconds. /// Gets the time left on Huton in milliseconds.
/// </summary> /// </summary>
// TODO: Probably a short, confirm. public int HutonTimeLeft => this.hutonTimeLeft;
[FieldOffset(0)]
public int HutonTimeLeft;
/// <summary> /// <summary>
/// Gets the amount of Ninki available. /// Gets the amount of Ninki available.
/// </summary> /// </summary>
[FieldOffset(4)] public byte Ninki => this.ninki;
public byte Ninki;
/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Does not appear to be used")]
[FieldOffset(4)]
public byte TCJMudrasUsed;
/// <summary> /// <summary>
/// Gets the number of times Huton has been cast manually. /// Gets the number of times Huton has been cast manually.
/// </summary> /// </summary>
[FieldOffset(5)] public byte NumHutonManualCasts => this.numHutonManualCasts;
public byte NumHutonManualCasts;
} }
} }

View file

@ -8,10 +8,12 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct PLDGauge public struct PLDGauge
{ {
[FieldOffset(0)]
private byte gaugeAmount;
/// <summary> /// <summary>
/// Gets the current level of the Oath gauge. /// Gets the current level of the Oath gauge.
/// </summary> /// </summary>
[FieldOffset(0)] public byte GaugeAmount => this.gaugeAmount;
public byte GaugeAmount;
} }
} }

View file

@ -8,16 +8,20 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct RDMGauge public struct RDMGauge
{ {
[FieldOffset(0)]
private byte whiteGauge;
[FieldOffset(1)]
private byte blackGauge;
/// <summary> /// <summary>
/// Gets the level of the White gauge. /// Gets the level of the White gauge.
/// </summary> /// </summary>
[FieldOffset(0)] public byte WhiteGauge => this.whiteGauge;
public byte WhiteGauge;
/// <summary> /// <summary>
/// Gets the level of the Black gauge. /// Gets the level of the Black gauge.
/// </summary> /// </summary>
[FieldOffset(1)] public byte BlackGauge => this.blackGauge;
public byte BlackGauge;
} }
} }

View file

@ -8,23 +8,29 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct SAMGauge public struct SAMGauge
{ {
[FieldOffset(3)]
private byte kenki;
[FieldOffset(4)]
private byte meditationStacks;
[FieldOffset(5)]
private Sen sen;
/// <summary> /// <summary>
/// Gets the current amount of Kenki available. /// Gets the current amount of Kenki available.
/// </summary> /// </summary>
[FieldOffset(3)] public byte Kenki => this.kenki;
public byte Kenki;
/// <summary> /// <summary>
/// Gets the amount of Meditation stacks. /// Gets the amount of Meditation stacks.
/// </summary> /// </summary>
[FieldOffset(4)] public byte MeditationStacks => this.meditationStacks;
public byte MeditationStacks;
/// <summary> /// <summary>
/// Gets the active Sen. /// Gets the active Sen.
/// </summary> /// </summary>
[FieldOffset(5)] public Sen Sen => this.sen;
public Sen Sen;
/// <summary> /// <summary>
/// Gets if the Setsu Sen is active. /// Gets if the Setsu Sen is active.

View file

@ -8,28 +8,36 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct SCHGauge public struct SCHGauge
{ {
[FieldOffset(2)]
private byte numAetherflowStacks;
[FieldOffset(3)]
private byte fairyGaugeAmount;
[FieldOffset(4)]
private short seraphTimer;
[FieldOffset(6)]
private DismissedFairy dismissedFairy;
/// <summary> /// <summary>
/// Gets the amount of Aetherflow stacks available. /// Gets the amount of Aetherflow stacks available.
/// </summary> /// </summary>
[FieldOffset(2)] public byte NumAetherflowStacks => this.numAetherflowStacks;
public byte NumAetherflowStacks;
/// <summary> /// <summary>
/// Gets the current level of the Fairy Gauge. /// Gets the current level of the Fairy Gauge.
/// </summary> /// </summary>
[FieldOffset(3)] public byte FairyGaugeAmount => this.fairyGaugeAmount;
public byte FairyGaugeAmount;
/// <summary> /// <summary>
/// Gets the Seraph time remaining in milliseconds. /// Gets the Seraph time remaining in milliseconds.
/// </summary> /// </summary>
[FieldOffset(4)] public short SeraphTimer => this.seraphTimer;
public short SeraphTimer;
/// <summary> /// <summary>
/// Gets the last dismissed fairy. /// Gets the last dismissed fairy.
/// </summary> /// </summary>
[FieldOffset(6)] public DismissedFairy DismissedFairy => this.dismissedFairy;
public DismissedFairy DismissedFairy;
} }
} }

View file

@ -8,30 +8,38 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct SMNGauge public struct SMNGauge
{ {
[FieldOffset(0)]
private short timerRemaining;
[FieldOffset(2)]
private SummonPet returnSummon;
[FieldOffset(3)]
private PetGlam returnSummonGlam;
[FieldOffset(4)]
private byte numStacks;
/// <summary> /// <summary>
/// Gets the time remaining for the current summon. /// Gets the time remaining for the current summon.
/// </summary> /// </summary>
[FieldOffset(0)] public short TimerRemaining => this.timerRemaining;
public short TimerRemaining;
/// <summary> /// <summary>
/// Gets the summon that will return after the current summon expires. /// Gets the summon that will return after the current summon expires.
/// </summary> /// </summary>
[FieldOffset(2)] public SummonPet ReturnSummon => this.returnSummon;
public SummonPet ReturnSummon;
/// <summary> /// <summary>
/// Gets the summon glam for the <see cref="ReturnSummon"/>. /// Gets the summon glam for the <see cref="ReturnSummon"/>.
/// </summary> /// </summary>
[FieldOffset(3)] public PetGlam ReturnSummonGlam => this.returnSummonGlam;
public PetGlam ReturnSummonGlam;
/// <summary> /// <summary>
/// Gets the current stacks. /// Gets the current stacks.
/// Use the summon accessors instead. /// Use the summon accessors instead.
/// </summary> /// </summary>
[FieldOffset(4)] public byte NumStacks => this.numStacks;
public byte NumStacks;
/// <summary> /// <summary>
/// Gets if Phoenix is ready to be summoned. /// Gets if Phoenix is ready to be summoned.

View file

@ -8,10 +8,12 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct WARGauge public struct WARGauge
{ {
[FieldOffset(0)]
private byte beastGaugeAmount;
/// <summary> /// <summary>
/// Gets the amount of wrath in the Beast gauge. /// Gets the amount of wrath in the Beast gauge.
/// </summary> /// </summary>
[FieldOffset(0)] public byte BeastGaugeAmount => this.beastGaugeAmount;
public byte BeastGaugeAmount;
} }
} }

View file

@ -8,22 +8,28 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
public struct WHMGauge public struct WHMGauge
{ {
[FieldOffset(2)]
private short lilyTimer;
[FieldOffset(4)]
private byte numLilies;
[FieldOffset(5)]
private byte numBloodLily;
/// <summary> /// <summary>
/// Gets the time to next lily in milliseconds. /// Gets the time to next lily in milliseconds.
/// </summary> /// </summary>
[FieldOffset(2)] public short LilyTimer => this.lilyTimer;
public short LilyTimer;
/// <summary> /// <summary>
/// Gets the number of Lilies. /// Gets the number of Lilies.
/// </summary> /// </summary>
[FieldOffset(4)] public byte NumLilies => this.numLilies;
public byte NumLilies;
/// <summary> /// <summary>
/// Gets the number of times the blood lily has been nourished. /// Gets the number of times the blood lily has been nourished.
/// </summary> /// </summary>
[FieldOffset(5)] public byte NumBloodLily => this.numBloodLily;
public byte NumBloodLily;
} }
} }