From ce8f1dcf7d46a3a62cdddba53fdd6e55f8e341a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 16 Nov 2025 22:46:17 +0000 Subject: [PATCH] Fix pfUI AddEffect handling multiple calls Don't clear the confirmed flag after first use since pfUI may call AddEffect multiple times for the same spell. Instead, rely on the time-based expiry (0.5s timeout) to prevent stale tracking data. This fixes the issue where the second AddEffect call would see unconfirmed tracking and ignore the correct duration. --- Compatibility/pfUI.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compatibility/pfUI.lua b/Compatibility/pfUI.lua index ef26928..110fea1 100644 --- a/Compatibility/pfUI.lua +++ b/Compatibility/pfUI.lua @@ -158,15 +158,15 @@ function Extension.HookPfUILibdebuff() -- Only use tracking if it's confirmed (actual cast, not just evaluation) if tracking.duration and tracking.confirmed and (GetTime() - tracking.cast_time) < 0.5 then duration = tracking.duration - -- Clear confirmed flag after use to prevent reuse - tracking.confirmed = false + -- Don't clear confirmed flag - let time-based expiry handle it + -- pfUI may call AddEffect multiple times for the same spell if CleveRoids.debug then DEFAULT_CHAT_FRAME:AddMessage( string.format("|cff00ff00[pfUI AddEffect Hook]|r Overriding %s duration to %ds (from confirmed tracking)", effect, duration) ) end - elseif CleveRoids.debug and tracking.duration and not tracking.confirmed then + elseif CleveRoids.debug and tracking.duration and not tracking.confirmed and (GetTime() - tracking.cast_time) < 0.5 then DEFAULT_CHAT_FRAME:AddMessage( string.format("|cffaaaa00[pfUI AddEffect Hook]|r Ignoring %s tracking (not confirmed - evaluation only)", effect)