Skip to content

Commit

Permalink
Merge pull request Nik-Potokar#1410 from Taurenkey/main
Browse files Browse the repository at this point in the history
*More* CD fixes
  • Loading branch information
Taurenkey authored Jul 1, 2024
2 parents 0cdc97a + ec285a8 commit c6bcae0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions XIVSlothCombo/Data/CooldownData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using FFXIVClientStructs.FFXIV.Client.Game;
using System;
using XIVSlothCombo.Services;

namespace XIVSlothCombo.Data
{
Expand Down Expand Up @@ -35,7 +34,16 @@ public bool IsCooldown
public bool HasCharges => MaxCharges > 1;

/// <summary> Gets the remaining number of charges for an action. </summary>
public unsafe uint RemainingCharges => ActionManager.Instance()->GetCurrentCharges(ActionID);
public unsafe uint RemainingCharges
{
get
{
if (MaxCharges == 1)
return CooldownRemaining == 0 ? 1 : 0u;

return ActionManager.Instance()->GetCurrentCharges(ActionID);
}
}

/// <summary> Gets the cooldown time remaining until the next charge. </summary>
public float ChargeCooldownRemaining
Expand Down

0 comments on commit c6bcae0

Please sign in to comment.