Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: events will be a regex rather than equal.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 25, 2023
1 parent cc0234c commit a74bfea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion RotationSolver/SigReplacers/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using Action = Lumina.Excel.GeneratedSheets.Action;

namespace RotationSolver.SigReplacers
Expand Down Expand Up @@ -103,7 +104,7 @@ private static unsafe void RecordAction(GameObject tar, Action action, byte flag
//Macro
foreach (var item in Service.Configuration.Events)
{
if (item.Name != action.Name) continue;
if (!new Regex(item.Name).Match(action.Name).Success) continue;
if (item.MacroIndex < 0 || item.MacroIndex > 99) break;

MacroUpdater.Macros.Enqueue(new MacroItem(tar, item.IsShared ? RaptureMacroModule.Instance->Shared[item.MacroIndex] :
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver/Windows/RotationConfigWindow_Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ private void DrawEventTab()
if (ImGui.Button(LocalizationManager.RightLang.Configwindow_Events_AddEvent))
{
Service.Configuration.Events.Add(new ActionEventInfo());
Service.Configuration.Save();
}
ImGui.SameLine();
ImGuiHelper.Spacing();
Expand All @@ -38,6 +39,7 @@ private void DrawEventTab()
ref macroindex, 1, 0, 99))
{
Service.Configuration.Events[i].MacroIndex = macroindex;
Service.Configuration.Save();
}

bool isShared = Service.Configuration.Events[i].IsShared;
Expand All @@ -53,12 +55,12 @@ private void DrawEventTab()
if (ImGui.Button($"{LocalizationManager.RightLang.Configwindow_Events_RemoveEvent}##RemoveEvent{i}"))
{
Service.Configuration.Events.RemoveAt(i);
Service.Configuration.Save();
}
ImGui.Separator();
}
ImGui.EndChild();
}
ImGui.PopStyleVar();

}
}

0 comments on commit a74bfea

Please sign in to comment.