diff --git a/RotationSolver/SigReplacers/Watcher.cs b/RotationSolver/SigReplacers/Watcher.cs index dfb2a8878..665967e1a 100644 --- a/RotationSolver/SigReplacers/Watcher.cs +++ b/RotationSolver/SigReplacers/Watcher.cs @@ -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 @@ -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] : diff --git a/RotationSolver/Windows/RotationConfigWindow_Events.cs b/RotationSolver/Windows/RotationConfigWindow_Events.cs index 0a6c881a9..34a10ee7d 100644 --- a/RotationSolver/Windows/RotationConfigWindow_Events.cs +++ b/RotationSolver/Windows/RotationConfigWindow_Events.cs @@ -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(); @@ -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; @@ -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(); - } }