mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
StyleCop: JobGauges
This commit is contained in:
parent
97d8fa855a
commit
1f701ec165
21 changed files with 796 additions and 294 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup Label="Target">
|
<PropertyGroup Label="Target">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Build">
|
<PropertyGroup Label="Build">
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using Serilog;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState {
|
|
||||||
public class JobGauges {
|
|
||||||
private ClientStateAddressResolver Address { get; }
|
|
||||||
|
|
||||||
public JobGauges(ClientStateAddressResolver addressResolver) {
|
|
||||||
Address = addressResolver;
|
|
||||||
|
|
||||||
Log.Verbose("JobGaugeData address {JobGaugeData}", Address.JobGaugeData);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Should only be called with the gauge types in
|
|
||||||
// ClientState.Structs.JobGauge
|
|
||||||
public T Get<T>() {
|
|
||||||
return Marshal.PtrToStructure<T>(Address.JobGaugeData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
35
Dalamud/Game/ClientState/JobGauges.cs
Normal file
35
Dalamud/Game/ClientState/JobGauges.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This class converts in-memory Job gauge data to structs.
|
||||||
|
/// </summary>
|
||||||
|
public class JobGauges
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="JobGauges"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="addressResolver">Address resolver with the JobGauge memory location(s).</param>
|
||||||
|
public JobGauges(ClientStateAddressResolver addressResolver)
|
||||||
|
{
|
||||||
|
this.Address = addressResolver;
|
||||||
|
|
||||||
|
Log.Verbose("JobGaugeData address {JobGaugeData}", this.Address.JobGaugeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ClientStateAddressResolver Address { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the JobGauge for a given job.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">A JobGauge struct from ClientState.Structs.JobGauge.</typeparam>
|
||||||
|
/// <returns>A JobGauge.</returns>
|
||||||
|
public T Get<T>()
|
||||||
|
{
|
||||||
|
return Marshal.PtrToStructure<T>(this.Address.JobGaugeData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,25 +1,35 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory AST job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct ASTGauge {
|
public struct ASTGauge
|
||||||
[FieldOffset(4)] private CardType Card;
|
{
|
||||||
[FieldOffset(5)] private unsafe fixed byte Seals[3];
|
[FieldOffset(4)]
|
||||||
|
private CardType card;
|
||||||
|
|
||||||
public CardType DrawnCard() {
|
[FieldOffset(5)]
|
||||||
return Card;
|
private unsafe fixed byte seals[3];
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe bool ContainsSeal(SealType seal) {
|
/// <summary>
|
||||||
if (Seals[0] == (byte)seal) return true;
|
/// Gets the currently drawn <see cref="CardType"/>.
|
||||||
if (Seals[1] == (byte)seal) return true;
|
/// </summary>
|
||||||
if (Seals[2] == (byte)seal) return true;
|
/// <returns>Currently drawn <see cref="CardType"/>.</returns>
|
||||||
|
public CardType DrawnCard() => this.card;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check if a <see cref="SealType"/> is currently active on the divination gauge.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="seal">The <see cref="SealType"/> to check for.</param>
|
||||||
|
/// <returns>If the given Seal is currently divined.</returns>
|
||||||
|
public unsafe bool ContainsSeal(SealType seal)
|
||||||
|
{
|
||||||
|
if (this.seals[0] == (byte)seal) return true;
|
||||||
|
if (this.seals[1] == (byte)seal) return true;
|
||||||
|
if (this.seals[2] == (byte)seal) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,59 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory BLM job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct BLMGauge {
|
public struct BLMGauge
|
||||||
[FieldOffset(0)] public short TimeUntilNextPolyglot; //eno timer (ms)
|
{
|
||||||
[FieldOffset(2)] public short ElementTimeRemaining; //ui/af timer
|
/// <summary>
|
||||||
[FieldOffset(4)] private byte ElementStance; //ui/af
|
/// Gets the time until the next Polyglot stack in milliseconds.
|
||||||
[FieldOffset(5)] public byte NumUmbralHearts; //number of umbral hearts
|
/// </summary>
|
||||||
[FieldOffset(6)] public byte NumPolyglotStacks; //number of polyglot stacks
|
[FieldOffset(0)]
|
||||||
[FieldOffset(7)] private byte EnoState; //eno active?
|
public short TimeUntilNextPolyglot; // enochian timer
|
||||||
|
|
||||||
public bool InUmbralIce() {
|
/// <summary>
|
||||||
return ElementStance > 4;
|
/// Gets the time remaining for Astral Fire or Umbral Ice in milliseconds.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public short ElementTimeRemaining; // umbral ice and astral fire timer
|
||||||
|
|
||||||
public bool InAstralFire() {
|
[FieldOffset(4)]
|
||||||
return ElementStance > 0 && ElementStance < 4;
|
private byte elementStance; // umbral ice or astral fire
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsEnoActive() {
|
/// <summary>
|
||||||
return EnoState > 0;
|
/// Gets the number of Umbral Hearts remaining.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(5)]
|
||||||
|
public byte NumUmbralHearts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of Polyglot stacks remaining.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(6)]
|
||||||
|
public byte NumPolyglotStacks;
|
||||||
|
|
||||||
|
[FieldOffset(7)]
|
||||||
|
private byte enochianState;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player is in Umbral Ice.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool InUmbralIce() => this.elementStance > 4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player is in Astral fire.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool InAstralFire() => this.elementStance > 0 && this.elementStance < 4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if Enochian is active.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsEnoActive() => this.enochianState > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,35 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory BRD job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct BRDGauge {
|
public struct BRDGauge
|
||||||
[FieldOffset(0)] public short SongTimer;
|
{
|
||||||
[FieldOffset(2)] public byte NumSongStacks;
|
/// <summary>
|
||||||
[FieldOffset(3)] public byte SoulVoiceValue;
|
/// Gets the current song timer in milliseconds.
|
||||||
[FieldOffset(4)] public CurrentSong ActiveSong;
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public short SongTimer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of stacks for the current song.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public byte NumSongStacks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the amount of Soul Voice accumulated.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(3)]
|
||||||
|
public byte SoulVoiceValue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the type of song that is active.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public CurrentSong ActiveSong;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,43 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory DNC job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public unsafe struct DNCGauge {
|
public unsafe struct DNCGauge
|
||||||
[FieldOffset(0)] public byte NumFeathers;
|
{
|
||||||
[FieldOffset(1)] public byte Esprit;
|
/// <summary>
|
||||||
[FieldOffset(2)] private fixed byte StepOrder[4];
|
/// Gets the number of feathers available.
|
||||||
[FieldOffset(6)] public byte NumCompleteSteps;
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte NumFeathers;
|
||||||
|
|
||||||
public bool IsDancing() {
|
/// <summary>
|
||||||
return StepOrder[0] != 0;
|
/// Gets the amount of Espirit available.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(1)]
|
||||||
|
public byte Esprit;
|
||||||
|
|
||||||
public ulong NextStep() {
|
[FieldOffset(2)]
|
||||||
return (ulong)(15999 + StepOrder[NumCompleteSteps] - 1);
|
private fixed byte stepOrder[4];
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of steps completed for the current dance.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(6)]
|
||||||
|
public byte NumCompleteSteps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the next step in the current dance.
|
||||||
|
/// </summary>
|
||||||
|
public ulong NextStep => (ulong)(15999 + this.stepOrder[this.NumCompleteSteps] - 1);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player is dancing or not.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsDancing() => this.stepOrder[0] != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,29 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory DRG job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct DRGGauge {
|
public struct DRGGauge
|
||||||
[FieldOffset(0)] public short BOTDTimer;
|
{
|
||||||
[FieldOffset(2)] public BOTDState BOTDState;
|
/// <summary>
|
||||||
[FieldOffset(3)] public byte EyeCount;
|
/// Gets the time remaining for Blood of the Dragon in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public short BOTDTimer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current state of Blood of the Dragon.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public BOTDState BOTDState;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the count of eyes opened during Blood of the Dragon.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(3)]
|
||||||
|
public byte EyeCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,38 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory DRK job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct DRKGauge {
|
public struct DRKGauge
|
||||||
[FieldOffset(0)] public byte Blood;
|
{
|
||||||
[FieldOffset(2)] public ushort DarksideTimeRemaining;
|
/// <summary>
|
||||||
[FieldOffset(4)] private byte DarkArtsState;
|
/// Gets the amount of blood accumulated.
|
||||||
[FieldOffset(6)] public ushort ShadowTimeRemaining;
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte Blood;
|
||||||
|
|
||||||
public bool HasDarkArts() {
|
/// <summary>
|
||||||
return DarkArtsState > 0;
|
/// Gets the Darkside time remaining in milliseconds.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public ushort DarksideTimeRemaining;
|
||||||
|
|
||||||
|
[FieldOffset(4)]
|
||||||
|
private byte darkArtsState;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Shadow time remaining in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(6)]
|
||||||
|
public ushort ShadowTimeRemaining;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player has Dark Arts or not.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool HasDarkArts() => this.darkArtsState > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,29 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory GNB job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct GNBGauge {
|
public struct GNBGauge
|
||||||
[FieldOffset(0)] public byte NumAmmo;
|
{
|
||||||
[FieldOffset(2)] public short MaxTimerDuration;
|
/// <summary>
|
||||||
[FieldOffset(4)] public byte AmmoComboStepNumber;
|
/// Gets the amount of ammo available.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte NumAmmo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the max combo time of the Gnashing Fang combo.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public short MaxTimerDuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current step of the Gnashing Fang combo.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public byte AmmoComboStepNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,272 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
public enum SealType : byte {
|
{
|
||||||
|
#region AST
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AST Divination seal types.
|
||||||
|
/// </summary>
|
||||||
|
public enum SealType : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No seal.
|
||||||
|
/// </summary>
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
SUN,
|
|
||||||
MOON,
|
/// <summary>
|
||||||
CELESTIAL
|
/// Sun seal.
|
||||||
|
/// </summary>
|
||||||
|
SUN = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Moon seal.
|
||||||
|
/// </summary>
|
||||||
|
MOON = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Celestial seal.
|
||||||
|
/// </summary>
|
||||||
|
CELESTIAL = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum CardType : byte {
|
/// <summary>
|
||||||
|
/// AST Arcanum (card) types.
|
||||||
|
/// </summary>
|
||||||
|
public enum CardType : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No card.
|
||||||
|
/// </summary>
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
BALANCE,
|
|
||||||
BOLE,
|
/// <summary>
|
||||||
ARROW,
|
/// The Balance card.
|
||||||
SPEAR,
|
/// </summary>
|
||||||
EWER,
|
BALANCE = 1,
|
||||||
SPIRE,
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Bole card.
|
||||||
|
/// </summary>
|
||||||
|
BOLE = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Arrow card.
|
||||||
|
/// </summary>
|
||||||
|
ARROW = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Spear card.
|
||||||
|
/// </summary>
|
||||||
|
SPEAR = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Ewer card.
|
||||||
|
/// </summary>
|
||||||
|
EWER = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Spire card.
|
||||||
|
/// </summary>
|
||||||
|
SPIRE = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Lord of Crowns card.
|
||||||
|
/// </summary>
|
||||||
LORD = 0x70,
|
LORD = 0x70,
|
||||||
LADY = 0x80
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Lady of Crowns card.
|
||||||
|
/// </summary>
|
||||||
|
LADY = 0x80,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SummonPet : byte {
|
#endregion
|
||||||
|
|
||||||
|
#region BRD
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// BRD Current Song types.
|
||||||
|
/// </summary>
|
||||||
|
public enum CurrentSong : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No song is active type.
|
||||||
|
/// </summary>
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
IFRIT = 3,
|
|
||||||
TITAN,
|
|
||||||
GARUDA
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PetGlam : byte {
|
/// <summary>
|
||||||
NONE = 0,
|
/// Mage's Ballad type.
|
||||||
EMERALD,
|
/// </summary>
|
||||||
TOPAZ,
|
|
||||||
RUBY
|
|
||||||
}
|
|
||||||
|
|
||||||
[Flags]
|
|
||||||
public enum Sen : byte {
|
|
||||||
NONE = 0,
|
|
||||||
SETSU = 1 << 0,
|
|
||||||
GETSU = 1 << 1,
|
|
||||||
KA = 1 << 2
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum BOTDState : byte {
|
|
||||||
NONE = 0,
|
|
||||||
BOTD,
|
|
||||||
LOTD
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum CurrentSong : byte {
|
|
||||||
MAGE = 5,
|
MAGE = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Army's Paeon type.
|
||||||
|
/// </summary>
|
||||||
ARMY = 0xA,
|
ARMY = 0xA,
|
||||||
WANDERER = 0xF
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Wanderer's Minuet type.
|
||||||
|
/// </summary>
|
||||||
|
WANDERER = 0xF,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DismissedFairy : byte {
|
#endregion
|
||||||
EOS = 6,
|
|
||||||
SELENE
|
#region DRG
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DRG Blood of the Dragon state types.
|
||||||
|
/// </summary>
|
||||||
|
public enum BOTDState : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Inactive type.
|
||||||
|
/// </summary>
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Blood of the Dragon is active.
|
||||||
|
/// </summary>
|
||||||
|
BOTD = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Life of the Dragon is active.
|
||||||
|
/// </summary>
|
||||||
|
LOTD = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Mudras : byte {
|
#endregion
|
||||||
|
|
||||||
|
#region NIN
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NIN Mudra types.
|
||||||
|
/// </summary>
|
||||||
|
public enum Mudras : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Ten mudra.
|
||||||
|
/// </summary>
|
||||||
TEN = 1,
|
TEN = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chi mudra.
|
||||||
|
/// </summary>
|
||||||
CHI = 2,
|
CHI = 2,
|
||||||
JIN = 3
|
|
||||||
|
/// <summary>
|
||||||
|
/// Jin mudra.
|
||||||
|
/// </summary>
|
||||||
|
JIN = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SAM
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Samurai Sen types.
|
||||||
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
|
public enum Sen : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No Sen.
|
||||||
|
/// </summary>
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setsu Sen type.
|
||||||
|
/// </summary>
|
||||||
|
SETSU = 1 << 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Getsu Sen type.
|
||||||
|
/// </summary>
|
||||||
|
GETSU = 1 << 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ka Sen type.
|
||||||
|
/// </summary>
|
||||||
|
KA = 1 << 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SCH
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SCH Dismissed fairy types.
|
||||||
|
/// </summary>
|
||||||
|
public enum DismissedFairy : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Dismissed fairy is Eos.
|
||||||
|
/// </summary>
|
||||||
|
EOS = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dismissed fairy is Selene.
|
||||||
|
/// </summary>
|
||||||
|
SELENE = 7,
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SMN
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SMN summoned pet types.
|
||||||
|
/// </summary>
|
||||||
|
public enum SummonPet : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No pet.
|
||||||
|
/// </summary>
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The summoned pet Ifrit.
|
||||||
|
/// </summary>
|
||||||
|
IFRIT = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The summoned pet Titan.
|
||||||
|
/// </summary>
|
||||||
|
TITAN = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The summoned pet Garuda.
|
||||||
|
/// </summary>
|
||||||
|
GARUDA = 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SMN summoned pet glam types.
|
||||||
|
/// </summary>
|
||||||
|
public enum PetGlam : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No pet glam.
|
||||||
|
/// </summary>
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Emerald carbuncle pet glam.
|
||||||
|
/// </summary>
|
||||||
|
EMERALD = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Topaz carbuncle pet glam.
|
||||||
|
/// </summary>
|
||||||
|
TOPAZ = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ruby carbuncle pet glam.
|
||||||
|
/// </summary>
|
||||||
|
RUBY = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,56 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory MCH job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct MCHGauge{
|
public struct MCHGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the time time remaining for Overheat in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public short OverheatTimeRemaining;
|
||||||
|
|
||||||
[FieldOffset(0)] public short OverheatTimeRemaining;
|
/// <summary>
|
||||||
[FieldOffset(2)] public short RobotTimeRemaining;
|
/// Gets the time remaining for the Rook or Queen in milliseconds.
|
||||||
[FieldOffset(4)] public byte Heat;
|
/// </summary>
|
||||||
[FieldOffset(5)] public byte Battery;
|
[FieldOffset(2)]
|
||||||
[FieldOffset(6)] public byte LastRobotBatteryPower;
|
public short RobotTimeRemaining;
|
||||||
[FieldOffset(7)] private byte TimerActive;
|
|
||||||
|
|
||||||
public bool IsOverheated() {
|
/// <summary>
|
||||||
return (TimerActive & 1) != 0;
|
/// Gets the current Heat level.
|
||||||
}
|
/// </summary>
|
||||||
public bool IsRobotActive() {
|
[FieldOffset(4)]
|
||||||
return (TimerActive & 2) != 0;
|
public byte Heat;
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current Battery level.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(5)]
|
||||||
|
public byte Battery;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the battery level of the last Robot.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(6)]
|
||||||
|
public byte LastRobotBatteryPower;
|
||||||
|
|
||||||
|
[FieldOffset(7)]
|
||||||
|
private byte timerActive;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player is currently Overheated.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsOverheated() => (this.timerActive & 1) != 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the player has an active Robot.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsRobotActive() => (this.timerActive & 2) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,40 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory MNK job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct MNKGauge
|
public struct MNKGauge
|
||||||
{
|
{
|
||||||
[FieldOffset(0)] public 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")]
|
[Obsolete("GL has been removed from the game")]
|
||||||
[FieldOffset(0)] public byte GLTimer;
|
[FieldOffset(4)]
|
||||||
|
private byte glTimerFreezeState;
|
||||||
[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")]
|
[Obsolete("GL has been removed from the game")]
|
||||||
public bool IsGLTimerFroze() => false;
|
public bool IsGLTimerFroze() => false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,36 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory NIN job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct NINGauge
|
public struct NINGauge
|
||||||
{
|
{
|
||||||
[FieldOffset(0)] public int HutonTimeLeft;
|
/// <summary>
|
||||||
[FieldOffset(4)] public byte Ninki;
|
/// Gets the time left on Huton in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
// TODO: Probably a short, confirm.
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public int HutonTimeLeft;
|
||||||
|
|
||||||
[Obsolete("Does not appear to be used")]
|
/// <summary>
|
||||||
[FieldOffset(4)] public byte TCJMudrasUsed;
|
/// Gets the amount of Ninki available.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public byte Ninki;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obsolete.
|
||||||
|
/// </summary>
|
||||||
[Obsolete("Does not appear to be used")]
|
[Obsolete("Does not appear to be used")]
|
||||||
[FieldOffset(6)] public byte NumHutonManualCasts;
|
[FieldOffset(4)]
|
||||||
|
public byte TCJMudrasUsed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of times Huton has been cast manually.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(5)]
|
||||||
|
public byte NumHutonManualCasts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory PLD job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct PLDGauge {
|
public struct PLDGauge
|
||||||
[FieldOffset(0)] public byte GaugeAmount;
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current level of the Oath gauge.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte GaugeAmount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory RDM job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct RDMGauge {
|
public struct RDMGauge
|
||||||
[FieldOffset(0)] public byte WhiteGauge;
|
{
|
||||||
[FieldOffset(1)] public byte BlackGauge;
|
/// <summary>
|
||||||
|
/// Gets the level of the White gauge.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte WhiteGauge;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the level of the Black gauge.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(1)]
|
||||||
|
public byte BlackGauge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,47 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory SAM job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct SAMGauge {
|
public struct SAMGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current amount of Kenki available.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(3)]
|
||||||
|
public byte Kenki;
|
||||||
|
|
||||||
[FieldOffset(3)] public byte Kenki;
|
/// <summary>
|
||||||
[FieldOffset(4)] public byte MeditationStacks;
|
/// Gets the amount of Meditation stacks.
|
||||||
[FieldOffset(5)] public Sen Sen;
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public byte MeditationStacks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the active Sen.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(5)]
|
||||||
|
public Sen 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,35 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory SCH job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct SCHGauge {
|
public struct SCHGauge
|
||||||
[FieldOffset(2)] public byte NumAetherflowStacks;
|
{
|
||||||
[FieldOffset(3)] public byte FairyGaugeAmount;
|
/// <summary>
|
||||||
[FieldOffset(4)] public short SeraphTimer;
|
/// Gets the amount of Aetherflow stacks available.
|
||||||
[FieldOffset(6)] public DismissedFairy DismissedFairy;
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public byte NumAetherflowStacks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the current level of the Fairy Gauge.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(3)]
|
||||||
|
public byte FairyGaugeAmount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Seraph time remaining in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public short SeraphTimer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the last dismissed fairy.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(6)]
|
||||||
|
public DismissedFairy DismissedFairy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,54 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory SMN job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct SMNGauge {
|
public struct SMNGauge
|
||||||
|
{
|
||||||
//Unfinished
|
/// <summary>
|
||||||
[FieldOffset(0)] public short TimerRemaining;
|
/// Gets the time remaining for the current summon.
|
||||||
[FieldOffset(2)] public SummonPet ReturnSummon;
|
/// </summary>
|
||||||
[FieldOffset(3)] public PetGlam ReturnSummonGlam;
|
[FieldOffset(0)]
|
||||||
[FieldOffset(4)] public byte NumStacks;
|
public short TimerRemaining;
|
||||||
|
|
||||||
public bool IsPhoenixReady() {
|
/// <summary>
|
||||||
return (NumStacks & 0x10) > 0;
|
/// Gets the summon that will return after the current summon expires.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public SummonPet ReturnSummon;
|
||||||
|
|
||||||
public bool IsBahamutReady() {
|
/// <summary>
|
||||||
return (NumStacks & 8) > 0;
|
/// Gets the summon glam for the <see cref="ReturnSummon"/>.
|
||||||
}
|
/// </summary>
|
||||||
|
[FieldOffset(3)]
|
||||||
|
public PetGlam ReturnSummonGlam;
|
||||||
|
|
||||||
public bool HasAetherflowStacks() {
|
/// <summary>
|
||||||
return (NumStacks & 3) > 0;
|
/// Gets the current stacks.
|
||||||
}
|
/// Use the summon accessors instead.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public byte NumStacks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if Phoenix is ready to be summoned.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsPhoenixReady() => (this.NumStacks & 0x10) > 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if Bahamut is ready to be summoned.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool IsBahamutReady() => (this.NumStacks & 8) > 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if there are any Aetherflow stacks available.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
|
public bool HasAetherflowStacks() => (this.NumStacks & 3) > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory WAR job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct WARGauge {
|
public struct WARGauge
|
||||||
[FieldOffset(0)] public byte BeastGaugeAmount;
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the amount of wrath in the Beast gauge.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public byte BeastGaugeAmount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,29 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.ClientState.Structs.JobGauge {
|
|
||||||
|
|
||||||
|
namespace Dalamud.Game.ClientState.Structs.JobGauge
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// In-memory WHM job gauge.
|
||||||
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
public struct WHMGauge {
|
public struct WHMGauge
|
||||||
[FieldOffset(2)] public short LilyTimer; //Counts to 30k = 30s
|
{
|
||||||
[FieldOffset(4)] public byte NumLilies;
|
/// <summary>
|
||||||
[FieldOffset(5)] public byte NumBloodLily;
|
/// Gets the time to next lily in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(2)]
|
||||||
|
public short LilyTimer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of Lilies.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(4)]
|
||||||
|
public byte NumLilies;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the number of times the blood lily has been nourished.
|
||||||
|
/// </summary>
|
||||||
|
[FieldOffset(5)]
|
||||||
|
public byte NumBloodLily;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue