diff --git a/PallyPower.lua b/PallyPower.lua index 430317c..f7d0f7b 100644 --- a/PallyPower.lua +++ b/PallyPower.lua @@ -2023,6 +2023,17 @@ function PallyPower:UpdateRoster() local n = select(3, unitid:find("(%d+)")) tmp.name, tmp.rank, tmp.subgroup = GetRaidRosterInfo(n) tmp.zone = select(7, GetRaidRosterInfo(n)) + + if self.opt.hideHighGroups then + local maxPlayerCount = (select(5, GetInstanceInfo())) + if maxPlayerCount and (maxPlayerCount > 5) then + local numVisibleSubgroups = math.ceil(maxPlayerCount/5) + if not (tmp.subgroup <= numVisibleSubgroups) then + tmp.class = nil + end + end + end + local raidtank = select(10, GetRaidRosterInfo(n)) tmp.tank = ((raidtank == "MAINTANK") or (self.opt.mainAssist and (raidtank == "MAINASSIST"))) diff --git a/PallyPowerOptions.lua b/PallyPowerOptions.lua index bff7fcd..8f8272a 100644 --- a/PallyPowerOptions.lua +++ b/PallyPowerOptions.lua @@ -683,8 +683,30 @@ PallyPower.options = { return PallyPower.opt.enabled == false or not isPally end, args = { - mainroles = { + visibility = { order = 1, + name = L["Visibility Settings"], + type = "group", + inline = true, + args = { + hide_high = { + order = 1, + type = "toggle", + name = L["Hide Bench (by Subgroup)"], + desc = L["While you are in a Raid dungeon, hide any players outside of the usual subgroups for that dungeon. For example, if you are in a 10-player dungeon, any players in Group 3 or higher will be hidden."], + width = "full", + get = function() + return PallyPower.opt.hideHighGroups + end, + set = function(info, val) + PallyPower.opt.hideHighGroups = val + PallyPower:UpdateRoster() + end + }, + }, + }, + mainroles = { + order = 2, name = L["Main Tank / Main Assist Roles"], type = "group", inline = true,