mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
SMNGauge: Fix typo, update CS (#2197)
* chore(SMNGauge): update gauge to latest CS struct * chore(SMNGauge): Fix `AttunementTimerRemaining` typo * refactor(SMNGauge): Cast `AttunementType` to a new enum instead of leaving it raw * fix(SMNGauge): Use `AttunementType` for `Is<X>Attuned`
This commit is contained in:
parent
a2124bb73d
commit
82dd4629cb
2 changed files with 50 additions and 5 deletions
27
Dalamud/Game/ClientState/JobGauge/Enums/SummonAttunement.cs
Normal file
27
Dalamud/Game/ClientState/JobGauge/Enums/SummonAttunement.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
namespace Dalamud.Game.ClientState.JobGauge.Enums;
|
||||||
|
|
||||||
|
public enum SummonAttunement
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// No attunement.
|
||||||
|
/// </summary>
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attuned to the summon Ifrit.
|
||||||
|
/// Same as <see cref="JobGauge.Types.SMNGauge.IsIfritAttuned"/>.
|
||||||
|
/// </summary>
|
||||||
|
IFRIT = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attuned to the summon Titan.
|
||||||
|
/// Same as <see cref="JobGauge.Types.SMNGauge.IsTitanAttuned"/>.
|
||||||
|
/// </summary>
|
||||||
|
TITAN = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attuned to the summon Garuda.
|
||||||
|
/// Same as <see cref="JobGauge.Types.SMNGauge.IsGarudaAttuned"/>.
|
||||||
|
/// </summary>
|
||||||
|
GARUDA = 3,
|
||||||
|
}
|
||||||
|
|
@ -22,10 +22,13 @@ public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ushort SummonTimerRemaining => this.Struct->SummonTimer;
|
public ushort SummonTimerRemaining => this.Struct->SummonTimer;
|
||||||
|
|
||||||
|
[Obsolete("Typo fixed. Use AttunementTimerRemaining instead.", true)]
|
||||||
|
public ushort AttunmentTimerRemaining => this.AttunementTimerRemaining;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the time remaining for the current attunement.
|
/// Gets the time remaining for the current attunement.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ushort AttunmentTimerRemaining => this.Struct->AttunementTimer;
|
public ushort AttunementTimerRemaining => this.Struct->AttunementTimer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the summon that will return after the current summon expires.
|
/// Gets the summon that will return after the current summon expires.
|
||||||
|
|
@ -40,10 +43,25 @@ public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
|
||||||
public PetGlam ReturnSummonGlam => (PetGlam)this.Struct->ReturnSummonGlam;
|
public PetGlam ReturnSummonGlam => (PetGlam)this.Struct->ReturnSummonGlam;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the amount of aspected Attunment remaining.
|
/// Gets the amount of aspected Attunement remaining.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// As of 7.01, this should be treated as a bit field.
|
||||||
|
/// Use <see cref="AttunementCount"/> and <see cref="AttunementType"/> instead.
|
||||||
|
/// </remarks>
|
||||||
public byte Attunement => this.Struct->Attunement;
|
public byte Attunement => this.Struct->Attunement;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the count of attunement cost resource available.
|
||||||
|
/// </summary>
|
||||||
|
public byte AttunementCount => this.Struct->AttunementCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the type of attunement available.
|
||||||
|
/// Use the summon attuned accessors instead.
|
||||||
|
/// </summary>
|
||||||
|
public SummonAttunement AttunementType => (SummonAttunement)this.Struct->AttunementType;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current aether flags.
|
/// Gets the current aether flags.
|
||||||
/// Use the summon accessors instead.
|
/// Use the summon accessors instead.
|
||||||
|
|
@ -84,19 +102,19 @@ public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
|
||||||
/// Gets a value indicating whether if Ifrit is currently attuned.
|
/// Gets a value indicating whether if Ifrit is currently attuned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns><c>true</c> or <c>false</c>.</returns>
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
public bool IsIfritAttuned => this.AetherFlags.HasFlag(AetherFlags.IfritAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
|
public bool IsIfritAttuned => this.AttunementType == SummonAttunement.IFRIT;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether if Titan is currently attuned.
|
/// Gets a value indicating whether if Titan is currently attuned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns><c>true</c> or <c>false</c>.</returns>
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
public bool IsTitanAttuned => this.AetherFlags.HasFlag(AetherFlags.TitanAttuned) && !this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
|
public bool IsTitanAttuned => this.AttunementType == SummonAttunement.TITAN;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether if Garuda is currently attuned.
|
/// Gets a value indicating whether if Garuda is currently attuned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns><c>true</c> or <c>false</c>.</returns>
|
/// <returns><c>true</c> or <c>false</c>.</returns>
|
||||||
public bool IsGarudaAttuned => this.AetherFlags.HasFlag(AetherFlags.GarudaAttuned);
|
public bool IsGarudaAttuned => this.AttunementType == SummonAttunement.GARUDA;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether there are any Aetherflow stacks available.
|
/// Gets a value indicating whether there are any Aetherflow stacks available.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue