Files
wow-Heimdall/Weakauras/Display/event.lua
2024-12-12 17:58:33 +01:00

38 lines
808 B
Lua

-- TICKER_500
---@type allstates allstates
function(allstates)
local now = GetTime()
for k, state in pairs(allstates) do
local player = HeimdallStinkies[k]
if not player then
allstates[k] = {
show = false,
changed = true,
}
end
end
for k, v in pairs(HeimdallStinkies) do
print(k)
local ago = now - v.lastSeenInternal
if allstates[k] then
allstates[k].ago = string.format("%6.1fs", ago)
allstates[k].name = v:ToString()
allstates[k].changed = true
else
allstates[k] = {
show = true,
changed = true,
name = v:ToString(),
progressType = "timed",
duration = 60,
expirationTime = GetTime() + 60,
autohide = true,
index = ago,
ago = string.format("%6.1fs", ago),
}
end
end
return true
end