fix revenge reactive and majorly improve pfui compatibility for icons and actionbars

This commit is contained in:
Jrc13245
2025-11-26 07:48:12 -05:00
parent 21119c8bd5
commit 6a4f7a417c
3 changed files with 47 additions and 3 deletions
+33
View File
@@ -301,6 +301,36 @@ function Extension.SyncComboDurationToPfUI(guid, spellID, duration)
end
end
-- Register action event handler for pfUI button updates
function Extension.RegisterPfUIActionEventHandler()
if not pfUI or Extension.actionHandlerRegistered then
return
end
-- Register a handler that will be called whenever CleveRoids updates macro states
if CleveRoids.RegisterActionEventHandler then
CleveRoids.RegisterActionEventHandler(function(slot, event, ...)
-- Trigger pfUI's button update for this slot
-- pfUI exposes bars.update (the updatecache table) and bars.buttons
-- Mark the slot for update in pfUI's cache, which will be processed on next OnUpdate
if pfUI.bars and pfUI.bars.update then
-- Mark slot for update in pfUI's update cache
pfUI.bars.update[slot] = true
end
-- If there's a button at this slot, we can also directly update it
if pfUI.bars and pfUI.bars.buttons and pfUI.bars.buttons[slot] and pfUI.bars.ButtonFullUpdate then
-- Direct update the button for immediate visual feedback
pfUI.bars.ButtonFullUpdate(pfUI.bars.buttons[slot])
end
end)
Extension.actionHandlerRegistered = true
Extension.DLOG("Registered action event handler for pfUI button updates")
end
end
-- Main compatibility check and setup
function Extension.SetupCompatibility()
Extension.pfUILoaded = (pfUI ~= nil)
@@ -312,6 +342,9 @@ function Extension.SetupCompatibility()
-- Hook libdebuff for combo duration support
Extension.HookPfUILibdebuff()
-- Register action event handler for button updates
Extension.RegisterPfUIActionEventHandler()
if Extension.macrotweakLoaded then
Extension.DLOG("pfUI macrotweak module detected")