Replace custom/UnitXP timers with ClassicAPI C_Timer

- ScheduleTimer now wraps C_Timer.After, removing the dedicated timer
  frame + per-frame OnUpdate loop + timers queue.
- Aura-tracking cleanup -> C_Timer.NewTicker(5) (_auraCleanupTicker);
  drop the UnitXP arm, the named global CleveRoids_AuraTrackingCleanupTimer,
  and the inline "not hasUnitXP" fallback in OnAuraCastOther.
- Libdebuff cleanup -> C_Timer.NewTicker(30) (_cleanupTicker); drop the
  UnitXP arm and CleveRoids_LibDebuffCleanupTimer.
- Shutdown cancels the tickers instead of UnitXP timer disarm.

Cleanup now always runs (was gated on hasUnitXP) and no longer depends
on UnitXP threaded timers or named global callbacks. Tickers self-guard
on isShuttingDown and are cancelled on shutdown.
This commit is contained in:
Brues
2026-06-21 01:59:54 -05:00
parent 75a6371f52
commit f926ac5521
4 changed files with 25 additions and 62 deletions
+6 -8
View File
@@ -5158,14 +5158,12 @@ function CleveRoids.Frame:PLAYER_LOGOUT()
this:UnregisterAllEvents()
this:SetScript("OnUpdate", nil)
this:SetScript("OnEvent", nil)
-- Disarm UnitXP timers (they run in a separate thread and survive /reload)
if CleveRoids.hasUnitXP then
if CleveRoids._cleanupTimerId then
pcall(UnitXP, "timer", "disarm", CleveRoids._cleanupTimerId)
end
if CleveRoids._auraCleanupTimerId then
pcall(UnitXP, "timer", "disarm", CleveRoids._auraCleanupTimerId)
end
-- Cancel periodic C_Timer tickers
if CleveRoids._cleanupTicker then
CleveRoids._cleanupTicker:Cancel()
end
if CleveRoids._auraCleanupTicker then
CleveRoids._auraCleanupTicker:Cancel()
end
-- Clear spell caches to prevent stale data
if CleveRoids.spellIdCache then