Skip to content

Commit

Permalink
lfg tool message tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
TannerShmoog committed Oct 5, 2022
1 parent ceef17a commit ae41d85
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions GroupBrowser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ end

function GroupieGroupBrowser:clearCombatQueue()
for method in self._combatqueue do
print(method)
GroupieGroupBrowser[method](GroupieGroupBrowser)
GroupieGroupBrowser._combatqueue[method] = nil
end
Expand Down Expand Up @@ -891,33 +892,36 @@ end
function GroupieGroupBrowser:CreateMsg(isLFM, isLFG, instanceName, isHeroic, groupSize, numMembers, lootType, minlevel,
maxlevel, tankSpots, healerSpots, damageSpots, leaderRole)
local action = isLFM and "LFM" or "LFG"
local forwhat = format("%s%s", instanceName, (isHeroic and " H" or ""))
local forwhat = format("%s%s", (isHeroic and "Heroic " or ""), instanceName)
local groupStatus = groupSize > numMembers and format("(%s/%s)", numMembers, groupSize) or ""
local roleStatus = ""
if tankSpots > 0 or healerSpots > 0 or damageSpots > 0 then
roleStatus = "Need"
end

if tankSpots > 0 then
roleStatus = roleStatus .. " Tanks"
roleStatus = roleStatus .. "Tank "
end
if healerSpots > 0 then
roleStatus = roleStatus .. " Heals"
roleStatus = roleStatus .. "Heals "
end
if damageSpots > 0 then
roleStatus = roleStatus .. " DPS"
roleStatus = roleStatus .. "DPS "
end
local rolelfg = leaderRole == "NOROLE" and "" or (leaderRole == "DAMAGER" and "DPS" or _G[leaderRole])
local levels = ""
if minlevel then
if maxlevel and maxlevel ~= minlevel then
levels = format("L%d-%d", minlevel, maxlevel)
else
levels = format("L%d+", minlevel)
end
roleStatus = roleStatus:trim()
roleStatus = roleStatus:gsub(" ", ", ")
if tankSpots > 0 or healerSpots > 0 or damageSpots > 0 then
roleStatus = "Need " .. roleStatus
end

local rolelfg = leaderRole == "NOROLE" and "" or (leaderRole == "DAMAGER" and "DPS" or _G[leaderRole])

local msg
if isLFM then
msg = action .. " " .. forwhat .. " | " .. roleStatus .. " " .. groupStatus
if groupSize == 5 then
msg = action .. " " .. forwhat .. " | " .. roleStatus
elseif groupSize == 10 or groupSize == 25 then
msg = action .. " " .. forwhat .. " | " .. groupStatus
else
msg = action .. " " .. forwhat .. " | " .. groupStatus
end
else
msg = rolelfg .. " " .. action .. " " .. forwhat
end
Expand Down

0 comments on commit ae41d85

Please sign in to comment.