Rework battle pass timer into multiple weakauras

This commit is contained in:
2024-04-08 22:14:29 +02:00
parent 1a1e250e68
commit 02bde8ebb5
15 changed files with 170 additions and 46 deletions

View File

@@ -0,0 +1,17 @@
if WeakAurasSaved.Cyka == nil then WeakAurasSaved.Cyka = {} end
if WeakAurasSaved.Cyka.LoginInfo == nil then WeakAurasSaved.Cyka.LoginInfo = {} end
Today = date("%Y-%m-%d")
if WeakAurasSaved.Cyka.LoginInfo[UnitName("player")] == nil then WeakAurasSaved.Cyka.LoginInfo[UnitName("player")] = {} end
if WeakAurasSaved.Cyka.LoginInfo[UnitName("player")][Today] == nil then
WeakAurasSaved.Cyka.LoginInfo[UnitName("player")][Today] = {
isClaimed = false,
timeLeft = 120,
}
end
aura_env.GetTimeLeft = function()
local timeLeft = WeakAurasSaved.Cyka.LoginInfo[UnitName("player")][Today].timeLeft
if timeLeft == nil then return 120 end
return timeLeft
end