mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-13 19:37:44 +01:00
Gauge update (again)
This commit is contained in:
parent
a86887f1bf
commit
8758c4c04d
6 changed files with 127 additions and 185 deletions
|
|
@ -24,5 +24,25 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
|
|||
/// Ruby carbuncle pet glam.
|
||||
/// </summary>
|
||||
RUBY = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Normal carbuncle pet glam.
|
||||
/// </summary>
|
||||
CARBUNCLE = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Ifrit Egi pet glam.
|
||||
/// </summary>
|
||||
IFRIT = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Titan Egi pet glam.
|
||||
/// </summary>
|
||||
TITAN = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Garuda Egi pet glam.
|
||||
/// </summary>
|
||||
GARUDA = 7,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,18 +11,8 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
|
|||
NONE = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The summoned pet Ifrit.
|
||||
/// The summoned pet Carbuncle.
|
||||
/// </summary>
|
||||
IFRIT = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The summoned pet Titan.
|
||||
/// </summary>
|
||||
TITAN = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The summoned pet Garuda.
|
||||
/// </summary>
|
||||
GARUDA = 5,
|
||||
CARBUNCLE = 23,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Dalamud.Game.ClientState.JobGauge.Enums;
|
||||
|
||||
|
|
@ -30,17 +31,16 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
|
|||
/// <returns>Currently drawn crown <see cref="CardType"/>.</returns>
|
||||
public CardType DrawnCrownCard => (CardType)(this.Struct->Card - (this.Struct->Card % 10));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="SealType"/>s currently active.
|
||||
/// </summary>
|
||||
public SealType[] Seals => this.Struct->CurrentSeals.Cast<SealType>().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)
|
||||
{
|
||||
if (this.Struct->Seals[0] == (byte)seal) return true;
|
||||
if (this.Struct->Seals[1] == (byte)seal) return true;
|
||||
if (this.Struct->Seals[2] == (byte)seal) return true;
|
||||
return false;
|
||||
}
|
||||
public unsafe bool ContainsSeal(SealType seal) => this.Seals.Contains(seal);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
using System;
|
||||
|
||||
using Dalamud.Game.ClientState.JobGauge.Enums;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Gauge;
|
||||
|
||||
namespace Dalamud.Game.ClientState.JobGauge.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// In-memory SMN job gauge.
|
||||
/// </summary>
|
||||
public unsafe class SMNGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SummonerGauge>
|
||||
public unsafe class SMNGauge : JobGaugeBase<SummonerGauge>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SMNGauge"/> class.
|
||||
|
|
@ -21,40 +22,93 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
|
|||
/// <summary>
|
||||
/// Gets the time remaining for the current summon.
|
||||
/// </summary>
|
||||
public short TimerRemaining => this.Struct->TimerRemaining;
|
||||
public ushort SummonTimerRemaining => this.Struct->SummonTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time remaining for the current attunement.
|
||||
/// </summary>
|
||||
public ushort AttunmentTimerRemaining => this.Struct->SummonTimer;
|
||||
|
||||
/// <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 byte AetherFlags => this.Struct->AetherFlags;
|
||||
|
||||
/// <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 & 0x10) > 0;
|
||||
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 & 8) > 0;
|
||||
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.AetherFlags & 3) > 0;
|
||||
public bool HasAetherflowStacks => this.AetherflowStacks > 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the amount of Aetherflow available.
|
||||
/// </summary>
|
||||
public byte AetherflowStacks => (byte)(this.AetherFlags & AetherFlags.Aetherflow);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue