Merge pull request #697 from daemitus/gauge

Gauges
This commit is contained in:
goaaats 2021-12-05 05:01:14 +01:00 committed by GitHub
commit a86887f1bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 2 deletions

View file

@ -22,7 +22,13 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the currently drawn <see cref="CardType"/>.
/// </summary>
/// <returns>Currently drawn <see cref="CardType"/>.</returns>
public CardType DrawnCard => (CardType)this.Struct->Card;
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 => (CardType)(this.Struct->Card - (this.Struct->Card % 10));
/// <summary>
/// Check if a <see cref="SealType"/> is currently active on the divination gauge.

View file

@ -25,5 +25,10 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// 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

@ -0,0 +1,24 @@
using System;
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>
/// 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;
}
}

View file

@ -0,0 +1,40 @@
using System;
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>
/// 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;
}
}

@ -1 +1 @@
Subproject commit d578045bea85822bdf7853d3182c5b28d6fffd1c
Subproject commit b4b577fce3710e03db6cf50724b1b3f39b60f368