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,39 @@
--GROUP_ROSTER_UPDATE
function(e)
local r = "raid"
if IsInRaid() == false then
r = "party"
end
for i = 1, GetNumGroupMembers() do
local n = r .. i
local pname = UnitName(n)
local gname = GetGuildInfo(n)
local grank = select(3, GetGuildInfo(n))
--print(pname, gname, grank)
if not aura_env.playerList[pname] then
aura_env.playerList[pname] = {
["guild"] = gname,
["rank"] = grank,
}
end
end
DevTools_Dump(aura_env.playerList)
table.sort(aura_env.playerList)
DevTools_Dump(aura_env.playerList)
return true
end
--DISPLAY
function()
local output = ""
for k,v in pairs(aura_env.playerList) do
output = k .. " "
if v.guild then
output = output .. v.guild .. " " .. v.rank .. "\n"
end
end
return output
end
--INIT
aura_env.playerList = {}