Skip to content

Commit

Permalink
Fix Avarice.ActionOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
BrakusTapus authored and NostraThomas99 committed Jun 13, 2024
1 parent 08194f2 commit 10d7e82
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 10d7e82

Please sign in to comment.