Add afk and battlepass timer for easier battle pass experience

This commit is contained in:
2024-03-23 01:07:50 +01:00
parent f161030237
commit 1fb30875a9
10 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
if WeakAurasSaved.Cyka == nil then WeakAurasSaved.Cyka = {} end
if WeakAurasSaved.Cyka.LoginInfo == nil then WeakAurasSaved.Cyka.LoginInfo = {} end
aura_env.CalculateOnlineTime = function()
local time = 0
for k, info in ipairs(WeakAurasSaved.Cyka.LoginInfo[UnitName("player")]) do
if info.LogoutTime ~= nil then
time = time + (info.LogoutTime - info.LoginTime)
else
time = time + (GetTime() - info.LoginTime)
end
end
return time
end