Add afk and battlepass timer for easier battle pass experience
This commit is contained in:
14
FreshShit/BattlePassTimer/init.lua
Normal file
14
FreshShit/BattlePassTimer/init.lua
Normal 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
|
||||
Reference in New Issue
Block a user