Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
--GLOBAL_TICKER GET_LEVEL
function(e, ...)
if e == "GET_LEVEL" then
local name = ...
if not aura_env.scanList[name] then
aura_env.scanList[name] = GetTime()
end
end
for k, v in pairs(aura_env.scanList) do
if GetTime() - v > 30 then
aura_env.scanList[k] = nil
end
end
for i = 1, 40 do
local u = "nameplate" .. i
if UnitExists(u) then
local uname, level = UnitName(u), UnitLevel(u)
if aura_env.scanList[uname] then
WeakAurasSaved.CustomTrash.CachedLevels[uname] = level
aura_env.scanList[uname] = nil
end
else
break
end
end
end
--INIT
if not WeakAurasSaved.CustomTrash.CachedLevels then WeakAurasSaved.CustomTrash.CachedLevels = {} end
aura_env.scanList = {}