fix: show money for all characters

This commit is contained in:
Salikh Gurgenidze
2025-11-16 15:41:03 +04:00
parent af2483ff05
commit 12e55039f3
9 changed files with 66 additions and 91 deletions
+3 -7
View File
@@ -31,12 +31,12 @@ end
-- Initialize money tracker
function MoneyTracker:Initialize()
-- Track money changes
-- Track money changes and save immediately
addon.Modules.Events:OnMoneyChanged(function()
MoneyTracker:Update()
end, "MoneyTracker")
-- Initial update on login
-- Initial update and save on login
addon.Modules.Events:OnPlayerLogin(function()
local frame = CreateFrame("Frame")
local elapsed = 0
@@ -45,12 +45,8 @@ function MoneyTracker:Initialize()
if elapsed >= 1 then
frame:SetScript("OnUpdate", nil)
MoneyTracker:Update()
addon:Debug("Initial money saved")
end
end)
end, "MoneyTracker")
-- Save on logout
addon.Modules.Events:OnPlayerLogout(function()
MoneyTracker:Update()
end, "MoneyTracker")
end