mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 04:30:01 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user