diff --git a/Core.lua b/Core.lua index 1352d91..9702618 100644 --- a/Core.lua +++ b/Core.lua @@ -2330,6 +2330,27 @@ function CleveRoids.OnUpdate(self) end end + -- Check for expired reactive procs and update icons + if CleveRoids.reactiveProcs then + local hasExpiredProc = false + for spellName, procData in pairs(CleveRoids.reactiveProcs) do + if procData and procData.expiry and time >= procData.expiry then + -- DEBUG: Show proc expiration + if CleveRoids.debug then + DEFAULT_CHAT_FRAME:AddMessage( + string.format("|cffff9900[REACTIVE PROC]|r %s expired", spellName) + ) + end + CleveRoids.reactiveProcs[spellName] = nil + hasExpiredProc = true + end + end + -- If any proc expired, queue an action update to refresh icons + if hasExpiredProc then + CleveRoids.QueueActionUpdate() + end + end + -- PERFORMANCE OPTIMIZATION: Run memory cleanup less frequently (every 5 seconds instead of every frame) -- This reduces CPU usage while maintaining effective memory management if (time - CleveRoids.lastCleanupTime) >= CleveRoids.CLEANUP_INTERVAL then diff --git a/Utility.lua b/Utility.lua index 9d7b061..3a2a143 100644 --- a/Utility.lua +++ b/Utility.lua @@ -2574,7 +2574,7 @@ local reactivePatterns = { }, type = "enemy_dodge", requiresTargetGUID = true, - duration = 4.0 -- 4 second proc window + duration = 5.0 }, Riposte = { -- Procs when YOU parry an enemy attack @@ -2597,7 +2597,7 @@ local reactivePatterns = { "You block", -- English: "You block X's Y" "You dodge", -- English: "You dodge X's Y" "You parry", -- English: "You parry X's Y" - " blocked%)", -- English: "X hits you for Y (Z blocked)" + "hits you.*%(%d+ blocked%)", -- English: "X hits you for Y (Z blocked)" - more specific "Ihr blockt", -- German block "Ihr weicht aus", -- German dodge "Ihr pariert", -- German parry @@ -2616,7 +2616,7 @@ local reactivePatterns = { }, type = "player_avoid", requiresTargetGUID = false, -- Revenge usable on any target once procced - duration = 5.0 -- 5 second proc window + duration = 5.0 } } @@ -2685,6 +2685,14 @@ function CleveRoids.ParseReactiveCombatLog() local duration = config.duration or REACTIVE_PROC_DURATION CleveRoids.SetReactiveProc(spellName, duration, guid) + -- DEBUG: Show what triggered the proc + if CleveRoids.debug then + DEFAULT_CHAT_FRAME:AddMessage( + string.format("|cffff9900[REACTIVE PROC]|r %s triggered by: |cffffffff%s|r (pattern: |cffcccccc%s|r)", + spellName, message, pattern) + ) + end + -- Update action buttons to reflect new state CleveRoids.QueueActionUpdate() break