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)]
public struct BLMGauge
{
/// <summary>
/// Gets the time until the next Polyglot stack in milliseconds.
/// </summary>
[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)]
public short ElementTimeRemaining; // umbral ice and astral fire timer
private short elementTimeRemaining; // umbral ice and astral fire timer
[FieldOffset(4)]
private byte elementStance; // umbral ice or astral fire
/// <summary>
/// Gets the number of Umbral Hearts remaining.
/// </summary>
[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>
/// Gets the number of Polyglot stacks remaining.
/// </summary>
[FieldOffset(6)]
public byte NumPolyglotStacks;
public byte NumPolyglotStacks => this.numPolyglotStacks;
[FieldOffset(7)]
private byte enochianState;
/// <summary>
/// Gets the number of Umbral Hearts remaining.
/// </summary>
public byte NumUmbralHearts => this.numUmbralHearts;
/// <summary>
/// Gets if the player is in Umbral Ice.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,3 @@
using System;
using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Structs.JobGauge
@ -9,35 +8,12 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[StructLayout(LayoutKind.Explicit)]
public struct MNKGauge
{
[FieldOffset(0)]
private byte numChakra;
/// <summary>
/// Gets the number of Chakra available.
/// </summary>
[FieldOffset(0)]
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;
public byte NumChakra => this.numChakra;
}
}

View file

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

View file

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

View file

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

View file

@ -8,23 +8,29 @@ namespace Dalamud.Game.ClientState.Structs.JobGauge
[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>
[FieldOffset(3)]
public byte Kenki;
public byte Kenki => this.kenki;
/// <summary>
/// Gets the amount of Meditation stacks.
/// </summary>
[FieldOffset(4)]
public byte MeditationStacks;
public byte MeditationStacks => this.meditationStacks;
/// <summary>
/// Gets the active Sen.
/// </summary>
[FieldOffset(5)]
public Sen Sen;
public Sen Sen => this.sen;
/// <summary>
/// Gets if the Setsu Sen is active.

View file

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

View file

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

View file

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

View file

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