Skip to content

Commit

Permalink
Merge branch 'FFXIV-CombatReborn:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
BrakusTapus authored Oct 18, 2024
2 parents 3841e41 + e0eb1f8 commit a996dbd
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Objects.SubKinds;
using ECommons.DalamudServices;
using ECommons.EzIpcManager;
using ECommons.GameHelpers;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
Expand All @@ -12,7 +13,25 @@ internal static class ActionUpdater
{
internal static DateTime AutoCancelTime { get; set; } = DateTime.MinValue;

internal static IAction? NextAction { get; set; }
static ActionUpdater() {
EzIPC.Init(typeof(ActionUpdater), "RotationSolverReborn.ActionUpdater");
}

[EzIPCEvent] public static Action<uint>? NextGCDActionChanged;
[EzIPCEvent] public static Action<uint>? NextActionChanged;

private static IAction? _nextAction;
internal static IAction? NextAction
{
get => _nextAction;
set {
if (_nextAction != value)
{
_nextAction = value;
NextActionChanged?.Invoke(_nextAction?.ID ?? 0);
}
}
}

private static IBaseAction? _nextGCDAction;
const float gcdHeight = 5;
Expand All @@ -24,6 +43,7 @@ internal static IBaseAction? NextGCDAction
if (_nextGCDAction != value)
{
_nextGCDAction = value;
NextGCDActionChanged?.Invoke(_nextGCDAction?.AdjustedID ?? 0);
}
}
}
Expand Down

0 comments on commit a996dbd

Please sign in to comment.