feat(Core/Config): add option for LFG expansion (#7256)

This commit is contained in:
Patrick Lewis
2021-08-30 11:39:19 -07:00
committed by GitHub
parent 10983b118d
commit 1c43e6ac6e
4 changed files with 13 additions and 1 deletions

View File

@@ -394,7 +394,7 @@ namespace lfg
DungeonProgressionRequirements const* ar = sObjectMgr->GetAccessRequirement(dungeon->map, Difficulty(dungeon->difficulty));
uint32 lockData = 0;
if (dungeon->expansion > expansion)
if (dungeon->expansion > expansion || dungeon->expansion > sWorld->getIntConfig(CONFIG_LFG_DUNGEON_FINDER_EXPANSION))
lockData = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
lockData = LFG_LOCKSTATUS_RAID_LOCKED;

View File

@@ -329,6 +329,7 @@ enum WorldIntConfigs
CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION,
CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS,
CONFIG_LFG_OPTIONSMASK,
CONFIG_LFG_DUNGEON_FINDER_EXPANSION,
CONFIG_MAX_INSTANCES_PER_HOUR,
CONFIG_WINTERGRASP_PLR_MAX,
CONFIG_WINTERGRASP_PLR_MIN,

View File

@@ -1306,6 +1306,7 @@ void World::LoadConfigSettings(bool reload)
// Dungeon finder
m_int_configs[CONFIG_LFG_OPTIONSMASK] = sConfigMgr->GetOption<int32>("DungeonFinder.OptionsMask", 3);
m_int_configs[CONFIG_LFG_DUNGEON_FINDER_EXPANSION] = sConfigMgr->GetOption<int32>("DungeonFinder.Expansion", 2);
// Max instances per hour
m_int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetOption<int32>("AccountInstancesPerHour", 5);

View File

@@ -1252,6 +1252,16 @@ DeletedCharacterTicketTrace = 0
DungeonFinder.OptionsMask = 1
#
# DungeonFinder.Expansion
# Description: Allow setting which expansion can be used in LFG
# 2 - Wotlk (Default)
# 1 - TBC
# 0 - Classic
# Default: 2
DungeonFinder.Expansion = 2
#
# AccountInstancesPerHour
# Description: Controls the max amount of different instances player can enter within hour