feat(Core/LFG): Implemented LFG_OPTION_ENABLE_SEASONAL_BOSSES. (#8219)

Closes #8098
This commit is contained in:
UltraNix
2021-10-09 19:57:23 +02:00
committed by GitHub
parent 89f0c42c0e
commit 0eec867c3b
6 changed files with 23 additions and 18 deletions

View File

@@ -272,7 +272,7 @@ namespace lfg
void LFGMgr::Update(uint32 tdiff, uint8 task)
{
if (!isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
if (!isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER | LFG_OPTION_ENABLE_SEASONAL_BOSSES))
return;
if (task == 0)
@@ -394,6 +394,8 @@ namespace lfg
LfgDungeonSet const& dungeons = GetDungeonsByRandom(0);
LfgLockMap lock;
bool onlySeasonalBosses = m_options == LFG_OPTION_ENABLE_SEASONAL_BOSSES;
float avgItemLevel = player->GetAverageItemLevelForDF();
for (LfgDungeonSet::const_iterator it = dungeons.begin(); it != dungeons.end(); ++it)
@@ -405,7 +407,7 @@ namespace lfg
DungeonProgressionRequirements const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty));
uint32 lockData = 0;
if (dungeon->expansion > expansion)
if (dungeon->expansion > expansion || (onlySeasonalBosses && !dungeon->seasonal))
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;