thirdparty: add support for clevermacro

This commit is contained in:
shagu
2023-10-31 12:05:00 +01:00
parent 7d33976043
commit 72d577e2bf
4 changed files with 21 additions and 0 deletions
+1
View File
@@ -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")
+1
View File
@@ -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
+1
View File
@@ -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")
+18
View File
@@ -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