feat(Core: new hook OnPlayerQueueRandomDungeon() and revert (now unnecessary) PR (#8196)

This commit is contained in:
Francesco Borzì
2021-10-02 09:18:33 +02:00
committed by GitHub
parent ca47fc96f2
commit 775c6744d2
6 changed files with 11 additions and 13 deletions

View File

@@ -405,7 +405,7 @@ namespace lfg
DungeonProgressionRequirements const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty));
uint32 lockData = 0;
if (dungeon->expansion > expansion || dungeon->expansion > sWorld->getIntConfig(CONFIG_LFG_DUNGEON_FINDER_EXPANSION))
if (dungeon->expansion > expansion)
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;
@@ -572,6 +572,7 @@ namespace lfg
else
{
rDungeonId = (*dungeons.begin());
sScriptMgr->OnPlayerQueueRandomDungeon(player, rDungeonId);
}
// No break on purpose (Random can only be dungeon or heroic dungeon)
[[fallthrough]];