Files
wow-weakauras/FreshShit/WhoSniffer/event2.lua

31 lines
736 B
Lua

-- TICKER_500
---@type allstates allstates
function(allstates)
local now = GetTime()
for k, v in pairs(aura_env.alliance) do
local ago = now - v.lastSeen
if ago > aura_env.ttl then
allstates[k] = { show = false, changed = true }
aura_env.alliance[k] = nil
else
if allstates[k] then
allstates[k].ago = string.format("%6.1fs", ago)
allstates[k].changed = true
else
allstates[k] = {
show = true,
changed = true,
name = v:ToString(),
progressType = "timed",
duration = aura_env.ttl,
expirationTime = GetTime() + aura_env.ttl,
autohide = true,
index = ago,
ago = string.format("%6.1fs", ago),
}
end
end
end
return true
end