From b545f9bb3e8c875b436a62909f46b9e19503a7f1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 16 Nov 2025 22:39:17 +0000 Subject: [PATCH] CRITICAL: Add confirmation to DoCast hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue: None of the CastSpellByName/CastSpell hooks were firing because CleveRoid macros go through DoCast, not the standard casting functions. Evidence from user output: - Many "ComboTrack: Rip cast with 5 CP" messages ✓ (TrackComboPointCast called) - NO "[Confirmed]" messages ✗ (no hooks firing) - "[pfUI AddEffect Hook] Ignoring Rip tracking (not confirmed)" ✗ (never confirmed) The DoCast integration was calling TrackComboPointCast but NOT setting confirmed=true, so pfUI would always see unconfirmed tracking data. Fix: Add confirmation in DoCast hook, just like all the other cast hooks. Now when user casts via CleveRoid macros: 1. DoCast fires → TrackComboPointCast → confirmed=true ✓ 2. pfUI AddEffect fires → sees confirmed=true → uses duration ✓ --- ComboPointTracker.lua | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ComboPointTracker.lua b/ComboPointTracker.lua index 7f4649a..737916b 100644 --- a/ComboPointTracker.lua +++ b/ComboPointTracker.lua @@ -541,20 +541,31 @@ if CleveRoids.DoCast then CleveRoids.DoCast = function(msg) -- Extract spell name from message local spellName = msg - + -- Remove conditionals if present local condEnd = string.find(msg, "]") if condEnd then spellName = string.sub(msg, condEnd + 1) end - + spellName = CleveRoids.Trim(spellName) - + -- Track combo points if it's a scaling spell if CleveRoids.IsComboScalingSpell(spellName) then CleveRoids.TrackComboPointCast(spellName) + + -- Confirm the tracking - DoCast only fires on actual casts + if CleveRoids.ComboPointTracking[spellName] then + CleveRoids.ComboPointTracking[spellName].confirmed = true + if CleveRoids.debug then + DEFAULT_CHAT_FRAME:AddMessage( + string.format("|cff00ff00[Confirmed]|r %s tracking confirmed (DoCast)", + spellName) + ) + end + end end - + -- Call original function return originalDoCast(msg) end