Closed JustRebeccabla closed 11 months ago
The issue comes from the EventManager only tracking UNIT_SPELLCAST_SUCCEEDED for spells in the global spellbook.
I've added a check to ensure the spell is coming from the player before "GetSpell" and made it work for all spells now.
Will likely need to do something better than this in the future.
Caffeine.Globals.EventManager:RegisterWoWEvent("UNIT_SPELLCAST_SUCCEEDED", function(...)
local unit, castGUID, spellID = ...
if unit ~= "player" then return end
local spell = Caffeine.Globals.SpellBook:GetSpell(spellID)
if unit == "player" and spell then
spell.lastCastAt = GetTime()
if spell:GetPostCastFunction() then
spell:GetPostCastFunction()(spell)
end
end
end)```
This is still an issue, tested on tinkr today
Both no bueno.