From 6365f0cdb1ed67f1c12e9f62b46284e4d8ca8ee1 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 7 Aug 2026 18:29:37 -0500 Subject: [PATCH] Read the innervate cooldown through ClassicAPI Replace nampower's GetSpellIdCooldown with C_Spell.GetSpellCooldown, and compute the remaining time from startTime plus duration (both seconds). Drop the presence guard, since ClassicAPI is a hard dependency. The module still needs nampower for the AURA_CAST events. --- modules/innervatecall.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/innervatecall.lua b/modules/innervatecall.lua index 9deddd45..3eae8367 100644 --- a/modules/innervatecall.lua +++ b/modules/innervatecall.lua @@ -75,14 +75,14 @@ pfUI:RegisterModule("innervatecall", function () SendChatMessage(">> Innervate casted on " .. targetName .. " <<", channel) - -- Schedule "ready" announcement when cooldown expires - -- Use GetSpellIdCooldown for precise remaining time, fallback to 360s + -- Schedule "ready" announcement when the cooldown expires. Read the + -- precise remaining time from C_Spell.GetSpellCooldown (startTime and + -- duration are seconds from the GetTime epoch); fall back to 360s. local cdRemaining = 360 - if GetSpellIdCooldown then - local cd = GetSpellIdCooldown(INNERVATE_SPELLID) - if cd and cd.cooldownRemainingMs and cd.cooldownRemainingMs > 0 then - cdRemaining = cd.cooldownRemainingMs / 1000 - end + local cd = C_Spell.GetSpellCooldown(INNERVATE_SPELLID) + if cd and cd.duration and cd.duration > 0 then + local remaining = cd.startTime + cd.duration - GetTime() + if remaining > 0 then cdRemaining = remaining end end C_Timer.After(cdRemaining, function()