Skip to content

Commit

Permalink
Merge pull request #105 from Advice-Dog/patch-1
Browse files Browse the repository at this point in the history
Allowing heroic dungeons when filtering by level
  • Loading branch information
Vysci authored Jul 6, 2021
2 parents 7075956 + 0bf1a71 commit 1ed9681
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 1ed9681

Please sign in to comment.