diff --git a/api/config.lua b/api/config.lua index 24aeb35f..4aa1ae71 100644 --- a/api/config.lua +++ b/api/config.lua @@ -770,6 +770,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1") pfUI:UpdateConfig("thirdparty", "bcs", "enable", "1") pfUI:UpdateConfig("thirdparty", "crafty", "enable", "1") + pfUI:UpdateConfig("thirdparty", "clevermacro", "enable", "1") pfUI:UpdateConfig("thirdparty", "flightmap", "enable", "1") pfUI:UpdateConfig("thirdparty", "sheepwatch", "enable", "1") pfUI:UpdateConfig("thirdparty", "totemtimers", "enable", "1") diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 73d654fe..cd6dbafb 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -380,6 +380,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () local function ButtonMacroScan(self) if self.bar > 10 then return end if not self.scanmacro then return end + if pfUI.bars.skip_macro then return end local macro = GetActionText(self.id) self.spellslot = nil diff --git a/modules/gui.lua b/modules/gui.lua index 67880832..6949e2e0 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2273,6 +2273,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox") CreateConfig(nil, "BetterCharacterStats", C.thirdparty.bcs, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "Crafty", C.thirdparty.crafty, "enable", "checkbox", nil, nil, nil, nil, "vanilla") + CreateConfig(nil, "CleverMacro", C.thirdparty.clevermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla") CreateConfig(nil, "AckisRecipeList", C.thirdparty.ackis, "enable", "checkbox", nil, nil, nil, nil, "tbc") CreateConfig(nil, "SheepWatch", C.thirdparty.sheepwatch, "enable", "checkbox", nil, nil, nil, nil, "tbc") CreateConfig(nil, "TotemTimers", C.thirdparty.totemtimers, "enable", "checkbox", nil, nil, nil, nil, "tbc") diff --git a/modules/thirdparty-vanilla.lua b/modules/thirdparty-vanilla.lua index 5746da6d..bed49f48 100644 --- a/modules/thirdparty-vanilla.lua +++ b/modules/thirdparty-vanilla.lua @@ -836,6 +836,24 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function() end) end) + -- CleverMacro + -- https://github.com/DanielAdolfsson/CleverMacro + HookAddonOrVariable("CleverMacro", function() + if C.thirdparty.clevermacro.enable == "0" then return end + + -- get pfUI actionbar event handler + local events = pfUI.bars and pfUI.bars:GetScript("OnEvent") + if not events then return end + + -- disable pfUI macro scanning + pfUI.bars.skip_macro = true + + -- send clevermacro events to pfUI actionbars + hooksecurefunc("ActionButton_OnEvent", function(event) + events(this, event) + end) + end) + HookAddonOrVariable("AtlasLoot", function() if C.thirdparty.atlasloot.enable == "0" then return end