mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
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:
@@ -2423,7 +2423,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
|
||||
{
|
||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW;
|
||||
}
|
||||
else if (proto->ItemLevel > 70)
|
||||
else if (sWorld->getIntConfig(CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION) && proto->ItemLevel > sWorld->getIntConfig(CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION))
|
||||
{
|
||||
if (proto->SubClass < subclassToCompare)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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) != '\\'))
|
||||
|
||||
@@ -3541,6 +3541,14 @@ Item.SetItemTradeable = 1
|
||||
|
||||
FFAPvPTimer = 30
|
||||
|
||||
#
|
||||
# LootNeedBeforeGreedILvlRestriction
|
||||
# Description: Specify level restriction for items below player's subclass in Need Before Greed loot mode in DF groups
|
||||
# Default: 70
|
||||
# 0 - Disabled
|
||||
|
||||
LootNeedBeforeGreedILvlRestriction = 70
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user