mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user