Skip to content

Commit

Permalink
Merge pull request #172 from FFXIV-CombatReborn/avarice-list-fix
Browse files Browse the repository at this point in the history
Fix Avarice.ActionOverride
  • Loading branch information
NostraThomas99 authored Jun 13, 2024
2 parents 08194f2 + 10d7e82 commit b0d1238
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,24 @@ internal static void UpdateNextAction()
WrongAction = NextAction = NextGCDAction = null;
}

private static void SetAction(uint id) => Svc.PluginInterface.GetOrCreateData("Avarice.ActionOverride",
() => new List<uint>() { id })[0] = id;
private static List<uint> actionOverrideList;

private static void SetAction(uint id)
{
if (actionOverrideList == null)
{
actionOverrideList = Svc.PluginInterface.GetOrCreateData("Avarice.ActionOverride", () => new List<uint>());
}

if (actionOverrideList.Count == 0)
{
actionOverrideList.Add(id);
}
else
{
actionOverrideList[0] = id;
}
}

internal unsafe static void UpdateActionInfo()
{
Expand Down

0 comments on commit b0d1238

Please sign in to comment.