mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
thirdparty: add support for clevermacro
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user