diff --git a/Dalamud/Game/ClientState/JobGauge/Enums/SummonAttunement.cs b/Dalamud/Game/ClientState/JobGauge/Enums/SummonAttunement.cs new file mode 100644 index 000000000..e0b65966c --- /dev/null +++ b/Dalamud/Game/ClientState/JobGauge/Enums/SummonAttunement.cs @@ -0,0 +1,27 @@ +namespace Dalamud.Game.ClientState.JobGauge.Enums; + +public enum SummonAttunement +{ + /// + /// No attunement. + /// + NONE = 0, + + /// + /// Attuned to the summon Ifrit. + /// Same as . + /// + IFRIT = 1, + + /// + /// Attuned to the summon Titan. + /// Same as . + /// + TITAN = 2, + + /// + /// Attuned to the summon Garuda. + /// Same as . + /// + GARUDA = 3, +} diff --git a/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs index 81be0e762..4c27ae83a 100644 --- a/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs +++ b/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs @@ -22,10 +22,13 @@ public unsafe class SMNGauge : JobGaugeBase /// public ushort SummonTimerRemaining => this.Struct->SummonTimer; + [Obsolete("Typo fixed. Use AttunementTimerRemaining instead.", true)] + public ushort AttunmentTimerRemaining => this.AttunementTimerRemaining; + /// /// Gets the time remaining for the current attunement. /// - public ushort AttunmentTimerRemaining => this.Struct->AttunementTimer; + public ushort AttunementTimerRemaining => this.Struct->AttunementTimer; /// /// Gets the summon that will return after the current summon expires. @@ -40,10 +43,25 @@ public unsafe class SMNGauge : JobGaugeBase public PetGlam ReturnSummonGlam => (PetGlam)this.Struct->ReturnSummonGlam; /// - /// Gets the amount of aspected Attunment remaining. + /// Gets the amount of aspected Attunement remaining. /// + /// + /// As of 7.01, this should be treated as a bit field. + /// Use and instead. + /// public byte Attunement => this.Struct->Attunement; + /// + /// Gets the count of attunement cost resource available. + /// + public byte AttunementCount => this.Struct->AttunementCount; + + /// + /// Gets the type of attunement available. + /// Use the summon attuned accessors instead. + /// + public SummonAttunement AttunementType => (SummonAttunement)this.Struct->AttunementType; + /// /// Gets the current aether flags. /// Use the summon accessors instead. @@ -84,19 +102,19 @@ public unsafe class SMNGauge : JobGaugeBase /// Gets a value indicating whether if Ifrit is currently attuned. /// /// true or false. - public bool IsIfritAttuned => this.AetherFlags.HasFlag(AetherFlags.IfritAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned); + public bool IsIfritAttuned => this.AttunementType == SummonAttunement.IFRIT; /// /// Gets a value indicating whether if Titan is currently attuned. /// /// true or false. - public bool IsTitanAttuned => this.AetherFlags.HasFlag(AetherFlags.TitanAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned); + public bool IsTitanAttuned => this.AttunementType == SummonAttunement.TITAN; /// /// Gets a value indicating whether if Garuda is currently attuned. /// /// true or false. - public bool IsGarudaAttuned => this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned); + public bool IsGarudaAttuned => this.AttunementType == SummonAttunement.GARUDA; /// /// Gets a value indicating whether there are any Aetherflow stacks available.