feat(Core/Loot): add configurable option to specify ilv restriction for items below player class in NeedBeforeGreed loot mode in DF (#7701)

This commit is contained in:
UltraNix
2021-09-06 18:24:41 +02:00
committed by GitHub
parent 02b0b29ffa
commit 066d2ef85b
4 changed files with 12 additions and 1 deletions

View File

@@ -381,6 +381,7 @@ enum WorldIntConfigs
CONFIG_NPC_EVADE_IF_NOT_REACHABLE,
CONFIG_NPC_REGEN_TIME_IF_NOT_REACHABLE_IN_RAID,
CONFIG_FFA_PVP_TIMER,
CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION,
INT_CONFIG_VALUE_COUNT
};

View File

@@ -1233,6 +1233,8 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_FFA_PVP_TIMER] = sConfigMgr->GetOption<int32>("FFAPvPTimer", 30);
m_int_configs[CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION] = sConfigMgr->GetOption<int32>("LootNeedBeforeGreedILvlRestriction", 70);
///- Read the "Data" directory from the config file
std::string dataPath = sConfigMgr->GetOption<std::string>("DataDir", "./");
if (dataPath.empty() || (dataPath.at(dataPath.length() - 1) != '/' && dataPath.at(dataPath.length() - 1) != '\\'))