chore: convert Dalamud to file-scoped namespaces

This commit is contained in:
goat 2022-10-29 15:23:22 +02:00
parent b093323acc
commit 987ff8dc8f
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
368 changed files with 55081 additions and 55450 deletions

View file

@ -1,28 +1,27 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// MNK Beast Chakra types.
/// </summary>
public enum BeastChakra : byte
{
/// <summary>
/// MNK Beast Chakra types.
/// No card.
/// </summary>
public enum BeastChakra : byte
{
/// <summary>
/// No card.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// The Coeurl chakra.
/// </summary>
COEURL = 1,
/// <summary>
/// The Coeurl chakra.
/// </summary>
COEURL = 1,
/// <summary>
/// The Opo-Opo chakra.
/// </summary>
OPOOPO = 2,
/// <summary>
/// The Opo-Opo chakra.
/// </summary>
OPOOPO = 2,
/// <summary>
/// The Raptor chakra.
/// </summary>
RAPTOR = 3,
}
/// <summary>
/// The Raptor chakra.
/// </summary>
RAPTOR = 3,
}

View file

@ -1,53 +1,52 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// AST Arcanum (card) types.
/// </summary>
public enum CardType : byte
{
/// <summary>
/// AST Arcanum (card) types.
/// No card.
/// </summary>
public enum CardType : byte
{
/// <summary>
/// No card.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// The Balance card.
/// </summary>
BALANCE = 1,
/// <summary>
/// The Balance card.
/// </summary>
BALANCE = 1,
/// <summary>
/// The Bole card.
/// </summary>
BOLE = 2,
/// <summary>
/// The Bole card.
/// </summary>
BOLE = 2,
/// <summary>
/// The Arrow card.
/// </summary>
ARROW = 3,
/// <summary>
/// The Arrow card.
/// </summary>
ARROW = 3,
/// <summary>
/// The Spear card.
/// </summary>
SPEAR = 4,
/// <summary>
/// The Spear card.
/// </summary>
SPEAR = 4,
/// <summary>
/// The Ewer card.
/// </summary>
EWER = 5,
/// <summary>
/// The Ewer card.
/// </summary>
EWER = 5,
/// <summary>
/// The Spire card.
/// </summary>
SPIRE = 6,
/// <summary>
/// The Spire card.
/// </summary>
SPIRE = 6,
/// <summary>
/// The Lord of Crowns card.
/// </summary>
LORD = 0x70,
/// <summary>
/// The Lord of Crowns card.
/// </summary>
LORD = 0x70,
/// <summary>
/// The Lady of Crowns card.
/// </summary>
LADY = 0x80,
}
/// <summary>
/// The Lady of Crowns card.
/// </summary>
LADY = 0x80,
}

View file

@ -1,18 +1,17 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SCH Dismissed fairy types.
/// </summary>
public enum DismissedFairy : byte
{
/// <summary>
/// SCH Dismissed fairy types.
/// Dismissed fairy is Eos.
/// </summary>
public enum DismissedFairy : byte
{
/// <summary>
/// Dismissed fairy is Eos.
/// </summary>
EOS = 6,
EOS = 6,
/// <summary>
/// Dismissed fairy is Selene.
/// </summary>
SELENE = 7,
}
/// <summary>
/// Dismissed fairy is Selene.
/// </summary>
SELENE = 7,
}

View file

@ -1,33 +1,32 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SAM Kaeshi types.
/// </summary>
public enum Kaeshi : byte
{
/// <summary>
/// SAM Kaeshi types.
/// No Kaeshi is active.
/// </summary>
public enum Kaeshi : byte
{
/// <summary>
/// No Kaeshi is active.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// Kaeshi: Higanbana type.
/// </summary>
HIGANBANA = 1,
/// <summary>
/// Kaeshi: Higanbana type.
/// </summary>
HIGANBANA = 1,
/// <summary>
/// Kaeshi: Goken type.
/// </summary>
GOKEN = 2,
/// <summary>
/// Kaeshi: Goken type.
/// </summary>
GOKEN = 2,
/// <summary>
/// Kaeshi: Setsugekka type.
/// </summary>
SETSUGEKKA = 3,
/// <summary>
/// Kaeshi: Setsugekka type.
/// </summary>
SETSUGEKKA = 3,
/// <summary>
/// Kaeshi: Namikiri type.
/// </summary>
NAMIKIRI = 4,
}
/// <summary>
/// Kaeshi: Namikiri type.
/// </summary>
NAMIKIRI = 4,
}

View file

@ -1,23 +1,22 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// NIN Mudra types.
/// </summary>
public enum Mudras : byte
{
/// <summary>
/// NIN Mudra types.
/// Ten mudra.
/// </summary>
public enum Mudras : byte
{
/// <summary>
/// Ten mudra.
/// </summary>
TEN = 1,
TEN = 1,
/// <summary>
/// Chi mudra.
/// </summary>
CHI = 2,
/// <summary>
/// Chi mudra.
/// </summary>
CHI = 2,
/// <summary>
/// Jin mudra.
/// </summary>
JIN = 3,
}
/// <summary>
/// Jin mudra.
/// </summary>
JIN = 3,
}

View file

@ -1,26 +1,25 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// MNK Nadi types.
/// </summary>
[Flags]
public enum Nadi : byte
{
/// <summary>
/// MNK Nadi types.
/// No card.
/// </summary>
[Flags]
public enum Nadi : byte
{
/// <summary>
/// No card.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// The Lunar nadi.
/// </summary>
LUNAR = 2,
/// <summary>
/// The Lunar nadi.
/// </summary>
LUNAR = 2,
/// <summary>
/// The Solar nadi.
/// </summary>
SOLAR = 4,
}
/// <summary>
/// The Solar nadi.
/// </summary>
SOLAR = 4,
}

View file

@ -1,48 +1,47 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SMN summoned pet glam types.
/// </summary>
public enum PetGlam : byte
{
/// <summary>
/// SMN summoned pet glam types.
/// No pet glam.
/// </summary>
public enum PetGlam : byte
{
/// <summary>
/// No pet glam.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// Emerald carbuncle pet glam.
/// </summary>
EMERALD = 1,
/// <summary>
/// Emerald carbuncle pet glam.
/// </summary>
EMERALD = 1,
/// <summary>
/// Topaz carbuncle pet glam.
/// </summary>
TOPAZ = 2,
/// <summary>
/// Topaz carbuncle pet glam.
/// </summary>
TOPAZ = 2,
/// <summary>
/// Ruby carbuncle pet glam.
/// </summary>
RUBY = 3,
/// <summary>
/// Ruby carbuncle pet glam.
/// </summary>
RUBY = 3,
/// <summary>
/// Normal carbuncle pet glam.
/// </summary>
CARBUNCLE = 4,
/// <summary>
/// Normal carbuncle pet glam.
/// </summary>
CARBUNCLE = 4,
/// <summary>
/// Ifrit Egi pet glam.
/// </summary>
IFRIT = 5,
/// <summary>
/// Ifrit Egi pet glam.
/// </summary>
IFRIT = 5,
/// <summary>
/// Titan Egi pet glam.
/// </summary>
TITAN = 6,
/// <summary>
/// Titan Egi pet glam.
/// </summary>
TITAN = 6,
/// <summary>
/// Garuda Egi pet glam.
/// </summary>
GARUDA = 7,
}
/// <summary>
/// Garuda Egi pet glam.
/// </summary>
GARUDA = 7,
}

View file

@ -1,28 +1,27 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// AST Divination seal types.
/// </summary>
public enum SealType : byte
{
/// <summary>
/// AST Divination seal types.
/// No seal.
/// </summary>
public enum SealType : byte
{
/// <summary>
/// No seal.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// Sun seal.
/// </summary>
SUN = 1,
/// <summary>
/// Sun seal.
/// </summary>
SUN = 1,
/// <summary>
/// Moon seal.
/// </summary>
MOON = 2,
/// <summary>
/// Moon seal.
/// </summary>
MOON = 2,
/// <summary>
/// Celestial seal.
/// </summary>
CELESTIAL = 3,
}
/// <summary>
/// Celestial seal.
/// </summary>
CELESTIAL = 3,
}

View file

@ -1,31 +1,30 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// Samurai Sen types.
/// </summary>
[Flags]
public enum Sen : byte
{
/// <summary>
/// Samurai Sen types.
/// No Sen.
/// </summary>
[Flags]
public enum Sen : byte
{
/// <summary>
/// No Sen.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// Setsu Sen type.
/// </summary>
SETSU = 1 << 0,
/// <summary>
/// Setsu Sen type.
/// </summary>
SETSU = 1 << 0,
/// <summary>
/// Getsu Sen type.
/// </summary>
GETSU = 1 << 1,
/// <summary>
/// Getsu Sen type.
/// </summary>
GETSU = 1 << 1,
/// <summary>
/// Ka Sen type.
/// </summary>
KA = 1 << 2,
}
/// <summary>
/// Ka Sen type.
/// </summary>
KA = 1 << 2,
}

View file

@ -1,28 +1,27 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// BRD Song types.
/// </summary>
public enum Song : byte
{
/// <summary>
/// BRD Song types.
/// No song is active type.
/// </summary>
public enum Song : byte
{
/// <summary>
/// No song is active type.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// Mage's Ballad type.
/// </summary>
MAGE = 1,
/// <summary>
/// Mage's Ballad type.
/// </summary>
MAGE = 1,
/// <summary>
/// Army's Paeon type.
/// </summary>
ARMY = 2,
/// <summary>
/// Army's Paeon type.
/// </summary>
ARMY = 2,
/// <summary>
/// The Wanderer's Minuet type.
/// </summary>
WANDERER = 3,
}
/// <summary>
/// The Wanderer's Minuet type.
/// </summary>
WANDERER = 3,
}

View file

@ -1,18 +1,17 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums
namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SMN summoned pet types.
/// </summary>
public enum SummonPet : byte
{
/// <summary>
/// SMN summoned pet types.
/// No pet.
/// </summary>
public enum SummonPet : byte
{
/// <summary>
/// No pet.
/// </summary>
NONE = 0,
NONE = 0,
/// <summary>
/// The summoned pet Carbuncle.
/// </summary>
CARBUNCLE = 23,
}
/// <summary>
/// The summoned pet Carbuncle.
/// </summary>
CARBUNCLE = 23,
}

View file

@ -7,46 +7,45 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Serilog;
namespace Dalamud.Game.ClientState.JobGauge
namespace Dalamud.Game.ClientState.JobGauge;
/// <summary>
/// This class converts in-memory Job gauge data to structs.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
[ServiceManager.BlockingEarlyLoadedService]
public class JobGauges : IServiceType
{
/// <summary>
/// This class converts in-memory Job gauge data to structs.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
[ServiceManager.BlockingEarlyLoadedService]
public class JobGauges : IServiceType
private Dictionary<Type, JobGaugeBase> cache = new();
[ServiceManager.ServiceConstructor]
private JobGauges(ClientState clientState)
{
private Dictionary<Type, JobGaugeBase> cache = new();
this.Address = clientState.AddressResolver.JobGaugeData;
[ServiceManager.ServiceConstructor]
private JobGauges(ClientState clientState)
Log.Verbose($"JobGaugeData address 0x{this.Address.ToInt64():X}");
}
/// <summary>
/// Gets the address of the JobGauge data.
/// </summary>
public IntPtr 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>() where T : JobGaugeBase
{
// This is cached to mitigate the effects of using activator for instantiation.
// Since the gauge itself reads from live memory, there isn't much downside to doing this.
if (!this.cache.TryGetValue(typeof(T), out var gauge))
{
this.Address = clientState.AddressResolver.JobGaugeData;
Log.Verbose($"JobGaugeData address 0x{this.Address.ToInt64():X}");
gauge = this.cache[typeof(T)] = (T)Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { this.Address }, null);
}
/// <summary>
/// Gets the address of the JobGauge data.
/// </summary>
public IntPtr 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>() where T : JobGaugeBase
{
// This is cached to mitigate the effects of using activator for instantiation.
// Since the gauge itself reads from live memory, there isn't much downside to doing this.
if (!this.cache.TryGetValue(typeof(T), out var gauge))
{
gauge = this.cache[typeof(T)] = (T)Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { this.Address }, null);
}
return (T)gauge;
}
return (T)gauge;
}
}

View file

@ -3,44 +3,43 @@ using System.Linq;
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory AST job gauge.
/// </summary>
public unsafe class ASTGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.AstrologianGauge>
{
/// <summary>
/// In-memory AST job gauge.
/// Initializes a new instance of the <see cref="ASTGauge"/> class.
/// </summary>
public unsafe class ASTGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.AstrologianGauge>
/// <param name="address">Address of the job gauge.</param>
internal ASTGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="ASTGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal ASTGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the currently drawn <see cref="CardType"/>.
/// </summary>
/// <returns>Currently drawn <see cref="CardType"/>.</returns>
public CardType DrawnCard => (CardType)(this.Struct->Card & 0xF);
/// <summary>
/// Gets the currently drawn crown <see cref="CardType"/>.
/// </summary>
/// <returns>Currently drawn crown <see cref="CardType"/>.</returns>
public CardType DrawnCrownCard => this.Struct->Card - this.DrawnCard;
/// <summary>
/// Gets the <see cref="SealType"/>s currently active.
/// </summary>
public SealType[] Seals => this.Struct->CurrentSeals.Select(seal => (SealType)seal).ToArray();
/// <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) => this.Seals.Contains(seal);
}
/// <summary>
/// Gets the currently drawn <see cref="CardType"/>.
/// </summary>
/// <returns>Currently drawn <see cref="CardType"/>.</returns>
public CardType DrawnCard => (CardType)(this.Struct->Card & 0xF);
/// <summary>
/// Gets the currently drawn crown <see cref="CardType"/>.
/// </summary>
/// <returns>Currently drawn crown <see cref="CardType"/>.</returns>
public CardType DrawnCrownCard => this.Struct->Card - this.DrawnCard;
/// <summary>
/// Gets the <see cref="SealType"/>s currently active.
/// </summary>
public SealType[] Seals => this.Struct->CurrentSeals.Select(seal => (SealType)seal).ToArray();
/// <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) => this.Seals.Contains(seal);
}

View file

@ -1,73 +1,72 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory BLM job gauge.
/// </summary>
public unsafe class BLMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BlackMageGauge>
{
/// <summary>
/// In-memory BLM job gauge.
/// Initializes a new instance of the <see cref="BLMGauge"/> class.
/// </summary>
public unsafe class BLMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BlackMageGauge>
/// <param name="address">Address of the job gauge.</param>
internal BLMGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="BLMGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal BLMGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time remaining for the Enochian time in milliseconds.
/// </summary>
public short EnochianTimer => this.Struct->EnochianTimer;
/// <summary>
/// Gets the time remaining for Astral Fire or Umbral Ice in milliseconds.
/// </summary>
public short ElementTimeRemaining => this.Struct->ElementTimeRemaining;
/// <summary>
/// Gets the number of Polyglot stacks remaining.
/// </summary>
public byte PolyglotStacks => this.Struct->PolyglotStacks;
/// <summary>
/// Gets the number of Umbral Hearts remaining.
/// </summary>
public byte UmbralHearts => this.Struct->UmbralHearts;
/// <summary>
/// Gets the amount of Umbral Ice stacks.
/// </summary>
public byte UmbralIceStacks => (byte)(this.InUmbralIce ? -this.Struct->ElementStance : 0);
/// <summary>
/// Gets the amount of Astral Fire stacks.
/// </summary>
public byte AstralFireStacks => (byte)(this.InAstralFire ? this.Struct->ElementStance : 0);
/// <summary>
/// Gets a value indicating whether or not the player is in Umbral Ice.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool InUmbralIce => this.Struct->ElementStance < 0;
/// <summary>
/// Gets a value indicating whether or not the player is in Astral fire.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool InAstralFire => this.Struct->ElementStance > 0;
/// <summary>
/// Gets a value indicating whether or not Enochian is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsEnochianActive => this.Struct->EnochianActive;
/// <summary>
/// Gets a value indicating whether Paradox is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsParadoxActive => this.Struct->ParadoxActive;
}
/// <summary>
/// Gets the time remaining for the Enochian time in milliseconds.
/// </summary>
public short EnochianTimer => this.Struct->EnochianTimer;
/// <summary>
/// Gets the time remaining for Astral Fire or Umbral Ice in milliseconds.
/// </summary>
public short ElementTimeRemaining => this.Struct->ElementTimeRemaining;
/// <summary>
/// Gets the number of Polyglot stacks remaining.
/// </summary>
public byte PolyglotStacks => this.Struct->PolyglotStacks;
/// <summary>
/// Gets the number of Umbral Hearts remaining.
/// </summary>
public byte UmbralHearts => this.Struct->UmbralHearts;
/// <summary>
/// Gets the amount of Umbral Ice stacks.
/// </summary>
public byte UmbralIceStacks => (byte)(this.InUmbralIce ? -this.Struct->ElementStance : 0);
/// <summary>
/// Gets the amount of Astral Fire stacks.
/// </summary>
public byte AstralFireStacks => (byte)(this.InAstralFire ? this.Struct->ElementStance : 0);
/// <summary>
/// Gets a value indicating whether or not the player is in Umbral Ice.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool InUmbralIce => this.Struct->ElementStance < 0;
/// <summary>
/// Gets a value indicating whether or not the player is in Astral fire.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool InAstralFire => this.Struct->ElementStance > 0;
/// <summary>
/// Gets a value indicating whether or not Enochian is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsEnochianActive => this.Struct->EnochianActive;
/// <summary>
/// Gets a value indicating whether Paradox is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsParadoxActive => this.Struct->ParadoxActive;
}

View file

@ -3,94 +3,93 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums;
using FFXIVClientStructs.FFXIV.Client.Game.Gauge;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory BRD job gauge.
/// </summary>
public unsafe class BRDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BardGauge>
{
/// <summary>
/// In-memory BRD job gauge.
/// Initializes a new instance of the <see cref="BRDGauge"/> class.
/// </summary>
public unsafe class BRDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BardGauge>
/// <param name="address">Address of the job gauge.</param>
internal BRDGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="BRDGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal BRDGauge(IntPtr address)
: base(address)
}
/// <summary>
/// Gets the current song timer in milliseconds.
/// </summary>
public ushort SongTimer => this.Struct->SongTimer;
/// <summary>
/// Gets the amount of Repertoire accumulated.
/// </summary>
public byte Repertoire => this.Struct->Repertoire;
/// <summary>
/// Gets the amount of Soul Voice accumulated.
/// </summary>
public byte SoulVoice => this.Struct->SoulVoice;
/// <summary>
/// Gets the type of song that is active.
/// </summary>
public Song Song
{
get
{
if (this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuet))
return Song.WANDERER;
if (this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeon))
return Song.ARMY;
if (this.Struct->SongFlags.HasFlag(SongFlags.MagesBallad))
return Song.MAGE;
return Song.NONE;
}
}
/// <summary>
/// Gets the current song timer in milliseconds.
/// </summary>
public ushort SongTimer => this.Struct->SongTimer;
/// <summary>
/// Gets the amount of Repertoire accumulated.
/// </summary>
public byte Repertoire => this.Struct->Repertoire;
/// <summary>
/// Gets the amount of Soul Voice accumulated.
/// </summary>
public byte SoulVoice => this.Struct->SoulVoice;
/// <summary>
/// Gets the type of song that is active.
/// </summary>
public Song Song
/// <summary>
/// Gets the type of song that was last played.
/// </summary>
public Song LastSong
{
get
{
get
{
if (this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuet))
return Song.WANDERER;
if (this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuetLastPlayed))
return Song.WANDERER;
if (this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeon))
return Song.ARMY;
if (this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeonLastPlayed))
return Song.ARMY;
if (this.Struct->SongFlags.HasFlag(SongFlags.MagesBallad))
return Song.MAGE;
if (this.Struct->SongFlags.HasFlag(SongFlags.MagesBalladLastPlayed))
return Song.MAGE;
return Song.NONE;
}
return Song.NONE;
}
}
/// <summary>
/// Gets the type of song that was last played.
/// </summary>
public Song LastSong
/// <summary>
/// Gets the song Coda that are currently active.
/// </summary>
/// <remarks>
/// This will always return an array of size 3, inactive Coda are represented by <see cref="Song.NONE"/>.
/// </remarks>
public Song[] Coda
{
get
{
get
return new[]
{
if (this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuetLastPlayed))
return Song.WANDERER;
if (this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeonLastPlayed))
return Song.ARMY;
if (this.Struct->SongFlags.HasFlag(SongFlags.MagesBalladLastPlayed))
return Song.MAGE;
return Song.NONE;
}
}
/// <summary>
/// Gets the song Coda that are currently active.
/// </summary>
/// <remarks>
/// This will always return an array of size 3, inactive Coda are represented by <see cref="Song.NONE"/>.
/// </remarks>
public Song[] Coda
{
get
{
return new[]
{
this.Struct->SongFlags.HasFlag(SongFlags.MagesBalladCoda) ? Song.MAGE : Song.NONE,
this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeonCoda) ? Song.ARMY : Song.NONE,
this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuetCoda) ? Song.WANDERER : Song.NONE,
};
}
this.Struct->SongFlags.HasFlag(SongFlags.MagesBalladCoda) ? Song.MAGE : Song.NONE,
this.Struct->SongFlags.HasFlag(SongFlags.ArmysPaeonCoda) ? Song.ARMY : Song.NONE,
this.Struct->SongFlags.HasFlag(SongFlags.WanderersMinuetCoda) ? Song.WANDERER : Song.NONE,
};
}
}
}

View file

@ -1,60 +1,59 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DNC job gauge.
/// </summary>
public unsafe class DNCGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DancerGauge>
{
/// <summary>
/// In-memory DNC job gauge.
/// Initializes a new instance of the <see cref="DNCGauge"/> class.
/// </summary>
public unsafe class DNCGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DancerGauge>
/// <param name="address">Address of the job gauge.</param>
internal DNCGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="DNCGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal DNCGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the number of feathers available.
/// </summary>
public byte Feathers => this.Struct->Feathers;
/// <summary>
/// Gets the amount of Espirit available.
/// </summary>
public byte Esprit => this.Struct->Esprit;
/// <summary>
/// Gets the number of steps completed for the current dance.
/// </summary>
public byte CompletedSteps => this.Struct->StepIndex;
/// <summary>
/// Gets all the steps in the current dance.
/// </summary>
public unsafe uint[] Steps
{
get
{
var arr = new uint[4];
for (var i = 0; i < 4; i++)
arr[i] = this.Struct->DanceSteps[i] + 15999u - 1;
return arr;
}
}
/// <summary>
/// Gets the next step in the current dance.
/// </summary>
/// <returns>The next dance step action ID.</returns>
public uint NextStep => 15999u + this.Struct->DanceSteps[this.Struct->StepIndex] - 1;
/// <summary>
/// Gets a value indicating whether the player is dancing or not.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsDancing => this.Struct->DanceSteps[0] != 0;
}
/// <summary>
/// Gets the number of feathers available.
/// </summary>
public byte Feathers => this.Struct->Feathers;
/// <summary>
/// Gets the amount of Espirit available.
/// </summary>
public byte Esprit => this.Struct->Esprit;
/// <summary>
/// Gets the number of steps completed for the current dance.
/// </summary>
public byte CompletedSteps => this.Struct->StepIndex;
/// <summary>
/// Gets all the steps in the current dance.
/// </summary>
public unsafe uint[] Steps
{
get
{
var arr = new uint[4];
for (var i = 0; i < 4; i++)
arr[i] = this.Struct->DanceSteps[i] + 15999u - 1;
return arr;
}
}
/// <summary>
/// Gets the next step in the current dance.
/// </summary>
/// <returns>The next dance step action ID.</returns>
public uint NextStep => 15999u + this.Struct->DanceSteps[this.Struct->StepIndex] - 1;
/// <summary>
/// Gets a value indicating whether the player is dancing or not.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsDancing => this.Struct->DanceSteps[0] != 0;
}

View file

@ -1,39 +1,38 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DRG job gauge.
/// </summary>
public unsafe class DRGGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DragoonGauge>
{
/// <summary>
/// In-memory DRG job gauge.
/// Initializes a new instance of the <see cref="DRGGauge"/> class.
/// </summary>
public unsafe class DRGGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DragoonGauge>
/// <param name="address">Address of the job gauge.</param>
internal DRGGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="DRGGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal DRGGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time remaining for Life of the Dragon in milliseconds.
/// </summary>
public short LOTDTimer => this.Struct->LotdTimer;
/// <summary>
/// Gets a value indicating whether Life of the Dragon is active.
/// </summary>
public bool IsLOTDActive => this.Struct->LotdState == 2;
/// <summary>
/// Gets the count of eyes opened during Blood of the Dragon.
/// </summary>
public byte EyeCount => this.Struct->EyeCount;
/// <summary>
/// Gets the amount of Firstminds' Focus available.
/// </summary>
public byte FirstmindsFocusCount => this.Struct->FirstmindsFocusCount;
}
/// <summary>
/// Gets the time remaining for Life of the Dragon in milliseconds.
/// </summary>
public short LOTDTimer => this.Struct->LotdTimer;
/// <summary>
/// Gets a value indicating whether Life of the Dragon is active.
/// </summary>
public bool IsLOTDActive => this.Struct->LotdState == 2;
/// <summary>
/// Gets the count of eyes opened during Blood of the Dragon.
/// </summary>
public byte EyeCount => this.Struct->EyeCount;
/// <summary>
/// Gets the amount of Firstminds' Focus available.
/// </summary>
public byte FirstmindsFocusCount => this.Struct->FirstmindsFocusCount;
}

View file

@ -1,40 +1,39 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DRK job gauge.
/// </summary>
public unsafe class DRKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DarkKnightGauge>
{
/// <summary>
/// In-memory DRK job gauge.
/// Initializes a new instance of the <see cref="DRKGauge"/> class.
/// </summary>
public unsafe class DRKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DarkKnightGauge>
/// <param name="address">Address of the job gauge.</param>
internal DRKGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="DRKGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal DRKGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of blood accumulated.
/// </summary>
public byte Blood => this.Struct->Blood;
/// <summary>
/// Gets the Darkside time remaining in milliseconds.
/// </summary>
public ushort DarksideTimeRemaining => this.Struct->DarksideTimer;
/// <summary>
/// Gets the Shadow time remaining in milliseconds.
/// </summary>
public ushort ShadowTimeRemaining => this.Struct->ShadowTimer;
/// <summary>
/// Gets a value indicating whether the player has Dark Arts or not.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasDarkArts => this.Struct->DarkArtsState > 0;
}
/// <summary>
/// Gets the amount of blood accumulated.
/// </summary>
public byte Blood => this.Struct->Blood;
/// <summary>
/// Gets the Darkside time remaining in milliseconds.
/// </summary>
public ushort DarksideTimeRemaining => this.Struct->DarksideTimer;
/// <summary>
/// Gets the Shadow time remaining in milliseconds.
/// </summary>
public ushort ShadowTimeRemaining => this.Struct->ShadowTimer;
/// <summary>
/// Gets a value indicating whether the player has Dark Arts or not.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasDarkArts => this.Struct->DarkArtsState > 0;
}

View file

@ -1,34 +1,33 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory GNB job gauge.
/// </summary>
public unsafe class GNBGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.GunbreakerGauge>
{
/// <summary>
/// In-memory GNB job gauge.
/// Initializes a new instance of the <see cref="GNBGauge"/> class.
/// </summary>
public unsafe class GNBGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.GunbreakerGauge>
/// <param name="address">Address of the job gauge.</param>
internal GNBGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="GNBGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal GNBGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of ammo available.
/// </summary>
public byte Ammo => this.Struct->Ammo;
/// <summary>
/// Gets the max combo time of the Gnashing Fang combo.
/// </summary>
public short MaxTimerDuration => this.Struct->MaxTimerDuration;
/// <summary>
/// Gets the current step of the Gnashing Fang combo.
/// </summary>
public byte AmmoComboStep => this.Struct->AmmoComboStep;
}
/// <summary>
/// Gets the amount of ammo available.
/// </summary>
public byte Ammo => this.Struct->Ammo;
/// <summary>
/// Gets the max combo time of the Gnashing Fang combo.
/// </summary>
public short MaxTimerDuration => this.Struct->MaxTimerDuration;
/// <summary>
/// Gets the current step of the Gnashing Fang combo.
/// </summary>
public byte AmmoComboStep => this.Struct->AmmoComboStep;
}

View file

@ -1,24 +1,23 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// Base job gauge class.
/// </summary>
public abstract unsafe class JobGaugeBase
{
/// <summary>
/// Base job gauge class.
/// Initializes a new instance of the <see cref="JobGaugeBase"/> class.
/// </summary>
public abstract unsafe class JobGaugeBase
/// <param name="address">Address of the job gauge.</param>
internal JobGaugeBase(IntPtr address)
{
/// <summary>
/// Initializes a new instance of the <see cref="JobGaugeBase"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal JobGaugeBase(IntPtr address)
{
this.Address = address;
}
/// <summary>
/// Gets the address of this job gauge in memory.
/// </summary>
public IntPtr Address { get; }
this.Address = address;
}
/// <summary>
/// Gets the address of this job gauge in memory.
/// </summary>
public IntPtr Address { get; }
}

View file

@ -1,25 +1,24 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// Base job gauge class.
/// </summary>
/// <typeparam name="T">The underlying FFXIVClientStructs type.</typeparam>
public unsafe class JobGaugeBase<T> : JobGaugeBase where T : unmanaged
{
/// <summary>
/// Base job gauge class.
/// Initializes a new instance of the <see cref="JobGaugeBase{T}"/> class.
/// </summary>
/// <typeparam name="T">The underlying FFXIVClientStructs type.</typeparam>
public unsafe class JobGaugeBase<T> : JobGaugeBase where T : unmanaged
/// <param name="address">Address of the job gauge.</param>
internal JobGaugeBase(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="JobGaugeBase{T}"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal JobGaugeBase(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets an unsafe struct pointer of this job gauge.
/// </summary>
private protected T* Struct => (T*)this.Address;
}
/// <summary>
/// Gets an unsafe struct pointer of this job gauge.
/// </summary>
private protected T* Struct => (T*)this.Address;
}

View file

@ -1,56 +1,55 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory MCH job gauge.
/// </summary>
public unsafe class MCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MachinistGauge>
{
/// <summary>
/// In-memory MCH job gauge.
/// Initializes a new instance of the <see cref="MCHGauge"/> class.
/// </summary>
public unsafe class MCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MachinistGauge>
/// <param name="address">Address of the job gauge.</param>
internal MCHGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="MCHGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal MCHGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time time remaining for Overheat in milliseconds.
/// </summary>
public short OverheatTimeRemaining => this.Struct->OverheatTimeRemaining;
/// <summary>
/// Gets the time remaining for the Rook or Queen in milliseconds.
/// </summary>
public short SummonTimeRemaining => this.Struct->SummonTimeRemaining;
/// <summary>
/// Gets the current Heat level.
/// </summary>
public byte Heat => this.Struct->Heat;
/// <summary>
/// Gets the current Battery level.
/// </summary>
public byte Battery => this.Struct->Battery;
/// <summary>
/// Gets the battery level of the last summon (robot).
/// </summary>
public byte LastSummonBatteryPower => this.Struct->LastSummonBatteryPower;
/// <summary>
/// Gets a value indicating whether the player is currently Overheated.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsOverheated => (this.Struct->TimerActive & 1) != 0;
/// <summary>
/// Gets a value indicating whether the player has an active Robot.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsRobotActive => (this.Struct->TimerActive & 2) != 0;
}
/// <summary>
/// Gets the time time remaining for Overheat in milliseconds.
/// </summary>
public short OverheatTimeRemaining => this.Struct->OverheatTimeRemaining;
/// <summary>
/// Gets the time remaining for the Rook or Queen in milliseconds.
/// </summary>
public short SummonTimeRemaining => this.Struct->SummonTimeRemaining;
/// <summary>
/// Gets the current Heat level.
/// </summary>
public byte Heat => this.Struct->Heat;
/// <summary>
/// Gets the current Battery level.
/// </summary>
public byte Battery => this.Struct->Battery;
/// <summary>
/// Gets the battery level of the last summon (robot).
/// </summary>
public byte LastSummonBatteryPower => this.Struct->LastSummonBatteryPower;
/// <summary>
/// Gets a value indicating whether the player is currently Overheated.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsOverheated => (this.Struct->TimerActive & 1) != 0;
/// <summary>
/// Gets a value indicating whether the player has an active Robot.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsRobotActive => (this.Struct->TimerActive & 2) != 0;
}

View file

@ -3,43 +3,42 @@ using System.Linq;
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory MNK job gauge.
/// </summary>
public unsafe class MNKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MonkGauge>
{
/// <summary>
/// In-memory MNK job gauge.
/// Initializes a new instance of the <see cref="MNKGauge"/> class.
/// </summary>
public unsafe class MNKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MonkGauge>
/// <param name="address">Address of the job gauge.</param>
internal MNKGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="MNKGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal MNKGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of Chakra available.
/// </summary>
public byte Chakra => this.Struct->Chakra;
/// <summary>
/// Gets the types of Beast Chakra available.
/// </summary>
/// <remarks>
/// This will always return an array of size 3, inactive Beast Chakra are represented by <see cref="BeastChakra.NONE"/>.
/// </remarks>
public BeastChakra[] BeastChakra => this.Struct->BeastChakra.Select(c => (BeastChakra)c).ToArray();
/// <summary>
/// Gets the types of Nadi available.
/// </summary>
public Nadi Nadi => (Nadi)this.Struct->Nadi;
/// <summary>
/// Gets the time remaining that Blitz is active.
/// </summary>
public ushort BlitzTimeRemaining => this.Struct->BlitzTimeRemaining;
}
/// <summary>
/// Gets the amount of Chakra available.
/// </summary>
public byte Chakra => this.Struct->Chakra;
/// <summary>
/// Gets the types of Beast Chakra available.
/// </summary>
/// <remarks>
/// This will always return an array of size 3, inactive Beast Chakra are represented by <see cref="BeastChakra.NONE"/>.
/// </remarks>
public BeastChakra[] BeastChakra => this.Struct->BeastChakra.Select(c => (BeastChakra)c).ToArray();
/// <summary>
/// Gets the types of Nadi available.
/// </summary>
public Nadi Nadi => (Nadi)this.Struct->Nadi;
/// <summary>
/// Gets the time remaining that Blitz is active.
/// </summary>
public ushort BlitzTimeRemaining => this.Struct->BlitzTimeRemaining;
}

View file

@ -1,34 +1,33 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory NIN job gauge.
/// </summary>
public unsafe class NINGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.NinjaGauge>
{
/// <summary>
/// In-memory NIN job gauge.
/// Initializes a new instance of the <see cref="NINGauge"/> class.
/// </summary>
public unsafe class NINGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.NinjaGauge>
/// <param name="address">The address of the gauge.</param>
internal NINGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="NINGauge"/> class.
/// </summary>
/// <param name="address">The address of the gauge.</param>
internal NINGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time left on Huton in milliseconds.
/// </summary>
public int HutonTimer => this.Struct->HutonTimer;
/// <summary>
/// Gets the amount of Ninki available.
/// </summary>
public byte Ninki => this.Struct->Ninki;
/// <summary>
/// Gets the number of times Huton has been cast manually.
/// </summary>
public byte HutonManualCasts => this.Struct->HutonManualCasts;
}
/// <summary>
/// Gets the time left on Huton in milliseconds.
/// </summary>
public int HutonTimer => this.Struct->HutonTimer;
/// <summary>
/// Gets the amount of Ninki available.
/// </summary>
public byte Ninki => this.Struct->Ninki;
/// <summary>
/// Gets the number of times Huton has been cast manually.
/// </summary>
public byte HutonManualCasts => this.Struct->HutonManualCasts;
}

View file

@ -1,24 +1,23 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory PLD job gauge.
/// </summary>
public unsafe class PLDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.PaladinGauge>
{
/// <summary>
/// In-memory PLD job gauge.
/// Initializes a new instance of the <see cref="PLDGauge"/> class.
/// </summary>
public unsafe class PLDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.PaladinGauge>
/// <param name="address">Address of the job gauge.</param>
internal PLDGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="PLDGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal PLDGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the current level of the Oath gauge.
/// </summary>
public byte OathGauge => this.Struct->OathGauge;
}
/// <summary>
/// Gets the current level of the Oath gauge.
/// </summary>
public byte OathGauge => this.Struct->OathGauge;
}

View file

@ -1,34 +1,33 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory RDM job gauge.
/// </summary>
public unsafe class RDMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.RedMageGauge>
{
/// <summary>
/// In-memory RDM job gauge.
/// Initializes a new instance of the <see cref="RDMGauge"/> class.
/// </summary>
public unsafe class RDMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.RedMageGauge>
/// <param name="address">Address of the job gauge.</param>
internal RDMGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="RDMGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal RDMGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the level of the White gauge.
/// </summary>
public byte WhiteMana => this.Struct->WhiteMana;
/// <summary>
/// Gets the level of the Black gauge.
/// </summary>
public byte BlackMana => this.Struct->BlackMana;
/// <summary>
/// Gets the amount of mana stacks.
/// </summary>
public byte ManaStacks => this.Struct->ManaStacks;
}
/// <summary>
/// Gets the level of the White gauge.
/// </summary>
public byte WhiteMana => this.Struct->WhiteMana;
/// <summary>
/// Gets the level of the Black gauge.
/// </summary>
public byte BlackMana => this.Struct->BlackMana;
/// <summary>
/// Gets the amount of mana stacks.
/// </summary>
public byte ManaStacks => this.Struct->ManaStacks;
}

View file

@ -1,44 +1,43 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory RPR job gauge.
/// </summary>
public unsafe class RPRGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ReaperGauge>
{
/// <summary>
/// In-memory RPR job gauge.
/// Initializes a new instance of the <see cref="RPRGauge"/> class.
/// </summary>
public unsafe class RPRGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ReaperGauge>
/// <param name="address">Address of the job gauge.</param>
internal RPRGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="RPRGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal RPRGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of Soul available.
/// </summary>
public byte Soul => this.Struct->Soul;
/// <summary>
/// Gets the amount of Shroud available.
/// </summary>
public byte Shroud => this.Struct->Shroud;
/// <summary>
/// Gets the time remaining that Enshrouded is active.
/// </summary>
public ushort EnshroudedTimeRemaining => this.Struct->EnshroudedTimeRemaining;
/// <summary>
/// Gets the amount of Lemure Shroud available.
/// </summary>
public byte LemureShroud => this.Struct->LemureShroud;
/// <summary>
/// Gets the amount of Void Shroud available.
/// </summary>
public byte VoidShroud => this.Struct->VoidShroud;
}
/// <summary>
/// Gets the amount of Soul available.
/// </summary>
public byte Soul => this.Struct->Soul;
/// <summary>
/// Gets the amount of Shroud available.
/// </summary>
public byte Shroud => this.Struct->Shroud;
/// <summary>
/// Gets the time remaining that Enshrouded is active.
/// </summary>
public ushort EnshroudedTimeRemaining => this.Struct->EnshroudedTimeRemaining;
/// <summary>
/// Gets the amount of Lemure Shroud available.
/// </summary>
public byte LemureShroud => this.Struct->LemureShroud;
/// <summary>
/// Gets the amount of Void Shroud available.
/// </summary>
public byte VoidShroud => this.Struct->VoidShroud;
}

View file

@ -2,58 +2,57 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SAM job gauge.
/// </summary>
public unsafe class SAMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SamuraiGauge>
{
/// <summary>
/// In-memory SAM job gauge.
/// Initializes a new instance of the <see cref="SAMGauge"/> class.
/// </summary>
public unsafe class SAMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SamuraiGauge>
/// <param name="address">Address of the job gauge.</param>
internal SAMGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="SAMGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal SAMGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the currently active Kaeshi ability.
/// </summary>
public Kaeshi Kaeshi => (Kaeshi)this.Struct->Kaeshi;
/// <summary>
/// Gets the current amount of Kenki available.
/// </summary>
public byte Kenki => this.Struct->Kenki;
/// <summary>
/// Gets the amount of Meditation stacks.
/// </summary>
public byte MeditationStacks => this.Struct->MeditationStacks;
/// <summary>
/// Gets the active Sen.
/// </summary>
public Sen Sen => (Sen)this.Struct->SenFlags;
/// <summary>
/// Gets a value indicating whether 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 a value indicating whether 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 a value indicating whether the Ka Sen is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasKa => (this.Sen & Sen.KA) != 0;
}
/// <summary>
/// Gets the currently active Kaeshi ability.
/// </summary>
public Kaeshi Kaeshi => (Kaeshi)this.Struct->Kaeshi;
/// <summary>
/// Gets the current amount of Kenki available.
/// </summary>
public byte Kenki => this.Struct->Kenki;
/// <summary>
/// Gets the amount of Meditation stacks.
/// </summary>
public byte MeditationStacks => this.Struct->MeditationStacks;
/// <summary>
/// Gets the active Sen.
/// </summary>
public Sen Sen => (Sen)this.Struct->SenFlags;
/// <summary>
/// Gets a value indicating whether 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 a value indicating whether 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 a value indicating whether the Ka Sen is active.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasKa => (this.Sen & Sen.KA) != 0;
}

View file

@ -2,40 +2,39 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SCH job gauge.
/// </summary>
public unsafe class SCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ScholarGauge>
{
/// <summary>
/// In-memory SCH job gauge.
/// Initializes a new instance of the <see cref="SCHGauge"/> class.
/// </summary>
public unsafe class SCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ScholarGauge>
/// <param name="address">Address of the job gauge.</param>
internal SCHGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="SCHGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal SCHGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of Aetherflow stacks available.
/// </summary>
public byte Aetherflow => this.Struct->Aetherflow;
/// <summary>
/// Gets the current level of the Fairy Gauge.
/// </summary>
public byte FairyGauge => this.Struct->FairyGauge;
/// <summary>
/// Gets the remaining time Seraph is active in milliseconds.
/// </summary>
public short SeraphTimer => this.Struct->SeraphTimer;
/// <summary>
/// Gets the last dismissed fairy.
/// </summary>
public DismissedFairy DismissedFairy => (DismissedFairy)this.Struct->DismissedFairy;
}
/// <summary>
/// Gets the amount of Aetherflow stacks available.
/// </summary>
public byte Aetherflow => this.Struct->Aetherflow;
/// <summary>
/// Gets the current level of the Fairy Gauge.
/// </summary>
public byte FairyGauge => this.Struct->FairyGauge;
/// <summary>
/// Gets the remaining time Seraph is active in milliseconds.
/// </summary>
public short SeraphTimer => this.Struct->SeraphTimer;
/// <summary>
/// Gets the last dismissed fairy.
/// </summary>
public DismissedFairy DismissedFairy => (DismissedFairy)this.Struct->DismissedFairy;
}

View file

@ -1,40 +1,39 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SGE job gauge.
/// </summary>
public unsafe class SGEGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SageGauge>
{
/// <summary>
/// In-memory SGE job gauge.
/// Initializes a new instance of the <see cref="SGEGauge"/> class.
/// </summary>
public unsafe class SGEGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SageGauge>
/// <param name="address">Address of the job gauge.</param>
internal SGEGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="SGEGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal SGEGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of milliseconds elapsed until the next Addersgall is available.
/// This counts from 0 to 20_000.
/// </summary>
public short AddersgallTimer => this.Struct->AddersgallTimer;
/// <summary>
/// Gets the amount of Addersgall available.
/// </summary>
public byte Addersgall => this.Struct->Addersgall;
/// <summary>
/// Gets the amount of Addersting available.
/// </summary>
public byte Addersting => this.Struct->Addersting;
/// <summary>
/// Gets a value indicating whether Eukrasia is activated.
/// </summary>
public bool Eukrasia => this.Struct->Eukrasia == 1;
}
/// <summary>
/// Gets the amount of milliseconds elapsed until the next Addersgall is available.
/// This counts from 0 to 20_000.
/// </summary>
public short AddersgallTimer => this.Struct->AddersgallTimer;
/// <summary>
/// Gets the amount of Addersgall available.
/// </summary>
public byte Addersgall => this.Struct->Addersgall;
/// <summary>
/// Gets the amount of Addersting available.
/// </summary>
public byte Addersting => this.Struct->Addersting;
/// <summary>
/// Gets a value indicating whether Eukrasia is activated.
/// </summary>
public bool Eukrasia => this.Struct->Eukrasia == 1;
}

View file

@ -3,112 +3,111 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums;
using FFXIVClientStructs.FFXIV.Client.Game.Gauge;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SMN job gauge.
/// </summary>
public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
{
/// <summary>
/// In-memory SMN job gauge.
/// Initializes a new instance of the <see cref="SMNGauge"/> class.
/// </summary>
public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
/// <param name="address">Address of the job gauge.</param>
internal SMNGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="SMNGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal SMNGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time remaining for the current summon.
/// </summary>
public ushort SummonTimerRemaining => this.Struct->SummonTimer;
/// <summary>
/// Gets the time remaining for the current attunement.
/// </summary>
public ushort AttunmentTimerRemaining => this.Struct->AttunementTimer;
/// <summary>
/// Gets the summon that will return after the current summon expires.
/// This maps to the <see cref="Lumina.Excel.GeneratedSheets.Pet"/> sheet.
/// </summary>
public SummonPet ReturnSummon => (SummonPet)this.Struct->ReturnSummon;
/// <summary>
/// Gets the summon glam for the <see cref="ReturnSummon"/>.
/// This maps to the <see cref="Lumina.Excel.GeneratedSheets.PetMirage"/> sheet.
/// </summary>
public PetGlam ReturnSummonGlam => (PetGlam)this.Struct->ReturnSummonGlam;
/// <summary>
/// Gets the amount of aspected Attunment remaining.
/// </summary>
public byte Attunement => this.Struct->Attunement;
/// <summary>
/// Gets the current aether flags.
/// Use the summon accessors instead.
/// </summary>
public AetherFlags AetherFlags => this.Struct->AetherFlags;
/// <summary>
/// Gets a value indicating whether Bahamut is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsBahamutReady => !this.AetherFlags.HasFlag(AetherFlags.PhoenixReady);
/// <summary>
/// Gets a value indicating whether if Phoenix is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsPhoenixReady => this.AetherFlags.HasFlag(AetherFlags.PhoenixReady);
/// <summary>
/// Gets a value indicating whether if Ifrit is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsIfritReady => this.AetherFlags.HasFlag(AetherFlags.IfritReady);
/// <summary>
/// Gets a value indicating whether if Titan is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsTitanReady => this.AetherFlags.HasFlag(AetherFlags.TitanReady);
/// <summary>
/// Gets a value indicating whether if Garuda is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsGarudaReady => this.AetherFlags.HasFlag(AetherFlags.GarudaReady);
/// <summary>
/// Gets a value indicating whether if Ifrit is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsIfritAttuned => this.AetherFlags.HasFlag(AetherFlags.IfritAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether if Titan is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsTitanAttuned => this.AetherFlags.HasFlag(AetherFlags.TitanAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether if Garuda is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsGarudaAttuned => this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether there are any Aetherflow stacks available.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasAetherflowStacks => this.AetherflowStacks > 0;
/// <summary>
/// Gets the amount of Aetherflow available.
/// </summary>
public byte AetherflowStacks => (byte)(this.AetherFlags & AetherFlags.Aetherflow);
}
/// <summary>
/// Gets the time remaining for the current summon.
/// </summary>
public ushort SummonTimerRemaining => this.Struct->SummonTimer;
/// <summary>
/// Gets the time remaining for the current attunement.
/// </summary>
public ushort AttunmentTimerRemaining => this.Struct->AttunementTimer;
/// <summary>
/// Gets the summon that will return after the current summon expires.
/// This maps to the <see cref="Lumina.Excel.GeneratedSheets.Pet"/> sheet.
/// </summary>
public SummonPet ReturnSummon => (SummonPet)this.Struct->ReturnSummon;
/// <summary>
/// Gets the summon glam for the <see cref="ReturnSummon"/>.
/// This maps to the <see cref="Lumina.Excel.GeneratedSheets.PetMirage"/> sheet.
/// </summary>
public PetGlam ReturnSummonGlam => (PetGlam)this.Struct->ReturnSummonGlam;
/// <summary>
/// Gets the amount of aspected Attunment remaining.
/// </summary>
public byte Attunement => this.Struct->Attunement;
/// <summary>
/// Gets the current aether flags.
/// Use the summon accessors instead.
/// </summary>
public AetherFlags AetherFlags => this.Struct->AetherFlags;
/// <summary>
/// Gets a value indicating whether Bahamut is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsBahamutReady => !this.AetherFlags.HasFlag(AetherFlags.PhoenixReady);
/// <summary>
/// Gets a value indicating whether if Phoenix is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsPhoenixReady => this.AetherFlags.HasFlag(AetherFlags.PhoenixReady);
/// <summary>
/// Gets a value indicating whether if Ifrit is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsIfritReady => this.AetherFlags.HasFlag(AetherFlags.IfritReady);
/// <summary>
/// Gets a value indicating whether if Titan is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsTitanReady => this.AetherFlags.HasFlag(AetherFlags.TitanReady);
/// <summary>
/// Gets a value indicating whether if Garuda is ready to be summoned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsGarudaReady => this.AetherFlags.HasFlag(AetherFlags.GarudaReady);
/// <summary>
/// Gets a value indicating whether if Ifrit is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsIfritAttuned => this.AetherFlags.HasFlag(AetherFlags.IfritAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether if Titan is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsTitanAttuned => this.AetherFlags.HasFlag(AetherFlags.TitanAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether if Garuda is currently attuned.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsGarudaAttuned => this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
/// <summary>
/// Gets a value indicating whether there are any Aetherflow stacks available.
/// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasAetherflowStacks => this.AetherflowStacks > 0;
/// <summary>
/// Gets the amount of Aetherflow available.
/// </summary>
public byte AetherflowStacks => (byte)(this.AetherFlags & AetherFlags.Aetherflow);
}

View file

@ -1,24 +1,23 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory WAR job gauge.
/// </summary>
public unsafe class WARGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WarriorGauge>
{
/// <summary>
/// In-memory WAR job gauge.
/// Initializes a new instance of the <see cref="WARGauge"/> class.
/// </summary>
public unsafe class WARGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WarriorGauge>
/// <param name="address">Address of the job gauge.</param>
internal WARGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="WARGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal WARGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the amount of wrath in the Beast gauge.
/// </summary>
public byte BeastGauge => this.Struct->BeastGauge;
}
/// <summary>
/// Gets the amount of wrath in the Beast gauge.
/// </summary>
public byte BeastGauge => this.Struct->BeastGauge;
}

View file

@ -1,34 +1,33 @@
using System;
namespace Dalamud.Game.ClientState.JobGauge.Types
namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory WHM job gauge.
/// </summary>
public unsafe class WHMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WhiteMageGauge>
{
/// <summary>
/// In-memory WHM job gauge.
/// Initializes a new instance of the <see cref="WHMGauge"/> class.
/// </summary>
public unsafe class WHMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WhiteMageGauge>
/// <param name="address">Address of the job gauge.</param>
internal WHMGauge(IntPtr address)
: base(address)
{
/// <summary>
/// Initializes a new instance of the <see cref="WHMGauge"/> class.
/// </summary>
/// <param name="address">Address of the job gauge.</param>
internal WHMGauge(IntPtr address)
: base(address)
{
}
/// <summary>
/// Gets the time to next lily in milliseconds.
/// </summary>
public short LilyTimer => this.Struct->LilyTimer;
/// <summary>
/// Gets the number of Lilies.
/// </summary>
public byte Lily => this.Struct->Lily;
/// <summary>
/// Gets the number of times the blood lily has been nourished.
/// </summary>
public byte BloodLily => this.Struct->BloodLily;
}
/// <summary>
/// Gets the time to next lily in milliseconds.
/// </summary>
public short LilyTimer => this.Struct->LilyTimer;
/// <summary>
/// Gets the number of Lilies.
/// </summary>
public byte Lily => this.Struct->Lily;
/// <summary>
/// Gets the number of times the blood lily has been nourished.
/// </summary>
public byte BloodLily => this.Struct->BloodLily;
}