Files
wow-weakauras/Complete Projects/Legion/InspectIlvl.lua
2024-08-24 22:43:07 +02:00

21 lines
461 B
Lua

--INSPECT_READY CHAT_MSG_SYSTEM
function(e, msg)
if e == "INSPECT_READY" then
if GetTime() - aura_env.time >= 1 then
local name = UnitName("target")
SendChatMessage(".ilevel " .. name, "SAY")
aura_env.time = GetTime()
end
elseif e == "CHAT_MSG_SYSTEM" then
aura_env.ilvl = msg:match("Equipped ilvl for .+: (%d+)")
return true
end
end
--DISPLAY
function()
return format("%d", aura_env.ilvl)
end
--INIT
aura_env.time = 0