diff --git a/Compatibility/SuperMacro.lua b/Compatibility/SuperMacro.lua index d82eccb..95818ef 100644 --- a/Compatibility/SuperMacro.lua +++ b/Compatibility/SuperMacro.lua @@ -135,6 +135,19 @@ do _G.RunMacro = hooked_RunMacro _G.Macro = hooked_RunMacro end + + -- Hook RunSuperMacro (for "Super" extended text macros) to clear stopmacro flag + -- This is a separate function from SuperMacro_RunMacro and uses RunLine directly + if type(_G.RunSuperMacro) == "function" then + local orig_RunSuperMacro = _G.RunSuperMacro + CRM.Hooks.RunSuperMacro = orig_RunSuperMacro + + _G.RunSuperMacro = function(index) + -- Clear stopmacro flag at macro start + CRM.stopMacroFlag = false + return orig_RunSuperMacro(index) + end + end end -- ===== Order-agnostic loader: install only when BOTH addons are present ===== diff --git a/Core.lua b/Core.lua index 54fc606..0c47e2f 100644 --- a/Core.lua +++ b/Core.lua @@ -3925,6 +3925,20 @@ local function CRM_SM_InstallHook() _G.Macro = hooked_RunMacro end + -- Hook RunSuperMacro (for "Super" extended text macros) to clear stopmacro flag + -- This is a separate function from SuperMacro_RunMacro and uses RunLine directly + if type(_G.RunSuperMacro) == "function" then + local orig_RunSuperMacro = _G.RunSuperMacro + CleveRoids.Hooks = CleveRoids.Hooks or {} + CleveRoids.Hooks.RunSuperMacro = orig_RunSuperMacro + + _G.RunSuperMacro = function(index) + -- Clear stopmacro flag at macro start + CleveRoids.stopMacroFlag = false + return orig_RunSuperMacro(index) + end + end + CleveRoids.SM_RunLineHooked = true end