63 lines
1.9 KiB
Lua
63 lines
1.9 KiB
Lua
--LFG_LIST_SEARCH_RESULTS_RECEIVED
|
|
function()
|
|
aura_env.grouperino = {}
|
|
for k,v in ipairs(select(2, C_LFGList.GetSearchResults())) do
|
|
local id,aid,name,desc = C_LFGList.GetSearchResultInfo(v)
|
|
local leader = select(13, C_LFGList.GetSearchResultInfo(v))
|
|
local members = select(14, C_LFGList.GetSearchResultInfo(v))
|
|
local dungeon = C_LFGList.GetActivityInfo(aid)
|
|
local tank, heal, dps = 0, 0, 0
|
|
for k,v in pairs(C_LFGList.GetSearchResultMemberCounts(v)) do
|
|
if k == "DAMAGER" then
|
|
dps = v
|
|
elseif k == "TANK" then
|
|
tank = v
|
|
elseif k == "HEALER" then
|
|
heal = v
|
|
end
|
|
end
|
|
local level = name:match("(%d+)") or "-"
|
|
local sname = dungeon:gsub(" (Mythic Keystone)", "")
|
|
if sname:match("Black Rook Hold") then sname = "BRH"
|
|
elseif sname:match("Court of Stars") then sname = "CoS"
|
|
elseif sname:match("Darkheart Thicket") then sname = "DHT"
|
|
elseif sname:match("Eye of Azshara") then sname = "EoA"
|
|
elseif sname:match("Halls of Valor") then sname = "HoV"
|
|
elseif sname:match("Maw of Souls") then sname = "MoS"
|
|
elseif sname:match("Neltharion's Lair") then sname = "NL"
|
|
elseif sname:match("The Arcway") then sname = "Arc"
|
|
elseif sname:match("Vault of the Wardens") then sname = "VoTW"
|
|
elseif sname:match("Cathedral of Eternal Night") then sname = "CoEN"
|
|
end
|
|
aura_env.grouperino[#aura_env.grouperino + 1] =
|
|
{
|
|
["Name"] = name,
|
|
["Description"] = desc,
|
|
["Leader"] = leader,
|
|
["Members"] = members,
|
|
["Dungeon"] = dungeon,
|
|
["Tank"] = tank,
|
|
["DPS"] = dps,
|
|
["Heal"] = heal,
|
|
|
|
["Dungeon2"] = sname,
|
|
["Level"] = level,
|
|
}
|
|
end
|
|
end
|
|
|
|
--DISPLAY
|
|
function()
|
|
local output = ""
|
|
for k,v in ipairs(aura_env.grouperino) do
|
|
if v.Level ~= "-" then
|
|
if tonumber(v.Level) > -1 then
|
|
output = output .. v.Dungeon2 .. " - " .. v.Level .. " " .. v.Members .. " " .. v.Tank .. "/" .. v.Heal .. "/" .. v.DPS .. "\n"
|
|
end
|
|
end
|
|
end
|
|
return output
|
|
end
|
|
|
|
--INIT
|
|
aura_env.grouperino = {} |