Add direct pfUI duration synchronization for combo spells

After analyzing pfUI's cooldown module, we need to directly sync
combo durations to pfUI's libdebuff.objects storage:

- Added SyncComboDurationToPfUI function to force-update pfUI's
  stored debuff duration after tracking combo spells
- Called from UNIT_CASTEVENT handler after AddEffect
- This ensures pfUI's cooldown display shows the correct combo
  duration (e.g., 28s for 5 CP Rip) instead of base 12s

pfUI's cooldown module is just a display layer - it shows durations
from pfUI.api.libdebuff.objects. By directly updating this storage,
we ensure the correct duration is displayed regardless of timing.
This commit is contained in:
Claude
2025-11-16 18:18:41 +00:00
parent 60bf1741ed
commit d6b4ae3d97
2 changed files with 30 additions and 0 deletions
+24
View File
@@ -177,6 +177,27 @@ function Extension.HookPfUILibdebuff()
return Extension.pfLibDebuffHooked or Extension.pfLibAddEffectHooked
end
-- Synchronize combo durations to pfUI's libdebuff objects
function Extension.SyncComboDurationToPfUI(guid, spellID, duration)
if not pfUI or not pfUI.api or not pfUI.api.libdebuff then
return
end
-- Update pfUI's stored debuff duration
local pflib = pfUI.api.libdebuff
if pflib.objects and pflib.objects[guid] and pflib.objects[guid][spellID] then
local old_duration = pflib.objects[guid][spellID].duration
pflib.objects[guid][spellID].duration = duration
if CleveRoids.debug then
DEFAULT_CHAT_FRAME:AddMessage(
string.format("|cff00ffaa[pfUI Sync]|r Updated spell %d duration: %ds -> %ds",
spellID, old_duration or 0, duration)
)
end
end
end
-- Main compatibility check and setup
function Extension.SetupCompatibility()
Extension.pfUILoaded = (pfUI ~= nil)
@@ -204,6 +225,9 @@ function Extension.OnLoad()
Extension.DLOG("Extension pfUI Loaded.")
Extension.HookMethod(CleveRoids, "GetFocusName", "FocusNameHook", true)
-- Export extension for external access
CleveRoids.Compatibility_pfUI = Extension
-- Initial compatibility check
Extension.SetupCompatibility()
end