From 8796fab6d89146797d8b1168bc1edab1a856dc41 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:37:41 -0500 Subject: [PATCH] libpredict: predict incoming heals for built-in click casting (#44) Built-in click casting drives the cast through secure frame attributes, bypassing the CastSpell/CastSpellByName/UseAction hooks that populate spell_queue -- so the heal-prediction lookup in the SPELL_START_SELF handler missed and no incoming heal showed. Populate spell_queue from the cast's own rank-specific spellId (via C_Spell.GetSpellName/GetSpellSubtext) right before the cache lookup, so prediction works regardless of how the cast was initiated. Deriving the rank from the actual spellId also fixes stale-rank lookups when a prior keybind cast left a different rank of the same spell queued. --- libs/libpredict.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/libpredict.lua b/libs/libpredict.lua index 56ddf3d1..27fa98b4 100644 --- a/libs/libpredict.lua +++ b/libs/libpredict.lua @@ -168,6 +168,9 @@ pfUI.libdebuff_spell_start_self_hooks["libpredict"] = function(spellId, casterGu return end + spell_queue[1] = spellName + spell_queue[2] = spellName .. (C_Spell.GetSpellSubtext(spellId) or "") + if spell_queue[1] == spellName and cache[spell_queue[2]] then local amount = cache[spell_queue[2]][1] local casttime = castTime