Skip to content

Commit

Permalink
Allowing heroic dungeons when filtering by level
Browse files Browse the repository at this point in the history
This allows the user to enable 'filter by level', and show heroics with low normal levels (such as Ramparts).
  • Loading branch information
Advice-Dog authored Jun 29, 2021
1 parent 314a9dc commit 0bf1a71
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions LFGBulletinBoard/GroupBulletinBoard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ function GBB.LevelRange(dungeon,short)
end

function GBB.FilterDungeon(dungeon, isHeroic, isRaid)
if dungeon==nil then return false end
if dungeon == nil then return false end
if isHeroic == nil then isHeroic = false end
if isRaid == nil then isRaid = false end

-- If the user is within the level range, or if they're max level and it's heroic.
local inLevelRange = (GBB.dungeonLevel[dungeon][1] <= GBB.UserLevel and GBB.UserLevel <= GBB.dungeonLevel[dungeon][2]) or (isHeroic and GBB.UserLevel == 70)

return GBB.DBChar["FilterDungeon"..dungeon] and (isRaid or ((GBB.DBChar["HeroicOnly"] == false or isHeroic) and (GBB.DBChar["NormalOnly"] == false or isHeroic == false))) and
(GBB.DBChar.FilterLevel==false or (GBB.dungeonLevel[dungeon][1] <= GBB.UserLevel and GBB.UserLevel <= GBB.dungeonLevel[dungeon][2]))
return GBB.DBChar["FilterDungeon"..dungeon] and
(isRaid or ((GBB.DBChar["HeroicOnly"] == false or isHeroic) and (GBB.DBChar["NormalOnly"] == false or isHeroic == false))) and
(GBB.DBChar.FilterLevel == false or inLevelRange)
end

function GBB.formatTime(sec)
Expand Down

0 comments on commit 0bf1a71

Please sign in to comment.