fix: Added isUnusable detection with caching

This commit is contained in:
Salikh Gurgenidze
2026-01-24 12:36:48 +04:00
parent 06db5f15fa
commit 52af32daaa
12 changed files with 198 additions and 258 deletions
+4 -10
View File
@@ -36,17 +36,11 @@ function MoneyTracker:Initialize()
MoneyTracker:Update()
end, "MoneyTracker")
-- Initial update and save on login
-- Initial update and save on login (uses pooled timer)
addon.Modules.Events:OnPlayerLogin(function()
local frame = CreateFrame("Frame")
local elapsed = 0
frame:SetScript("OnUpdate", function()
elapsed = elapsed + arg1
if elapsed >= 1 then
frame:SetScript("OnUpdate", nil)
MoneyTracker:Update()
addon:Debug("Initial money saved")
end
Guda_ScheduleTimer(1, function()
MoneyTracker:Update()
addon:Debug("Initial money saved")
end)
end, "MoneyTracker")
end