diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index be3ab4ba..7f6a7668 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -891,6 +891,14 @@ AiPlayerbot.AutoPickTalents = 1 # # +# Equips quality limitation for random bots (1 = normal, 2 = uncommon, 3 = rare, 4 = epic, 5 = legendary) +# default: 3 (rare) +AiPlayerbot.RandomGearQualityLimit = 3 + +# Equips gear score limitation for random bots (0 = no limit) +# default: 0 (no limit) +AiPlayerbot.RandomGearScoreLimit = 0 + # Change random bot has lower gear AiPlayerbot.RandomGearLoweringChance = 0 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 4d6a2a50..66148931 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -95,7 +95,10 @@ bool PlayerbotAIConfig::Initialize() autoAvoidAoe = sConfigMgr->GetOption("AiPlayerbot.AutoAvoidAoe", true); tellWhenAvoidAoe = sConfigMgr->GetOption("AiPlayerbot.TellWhenAvoidAoe", true); - randomGearLoweringChance = sConfigMgr->GetOption("AiPlayerbot.RandomGearLoweringChance", 0.15f); + randomGearLoweringChance = sConfigMgr->GetOption("AiPlayerbot.RandomGearLoweringChance", 0.0f); + randomGearQualityLimit = sConfigMgr->GetOption("AiPlayerbot.AutoGearQualityLimit", 3); + randomGearScoreLimit = sConfigMgr->GetOption("AiPlayerbot.AutoGearScoreLimit", 0); + randomBotMaxLevelChance = sConfigMgr->GetOption("AiPlayerbot.RandomBotMaxLevelChance", 0.15f); randomBotRpgChance = sConfigMgr->GetOption("AiPlayerbot.RandomBotRpgChance", 0.20f); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index d347b87e..7bbc0512 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -79,6 +79,8 @@ class PlayerbotAIConfig std::vector randomBotQuestIds; uint32 randomBotTeleportDistance; float randomGearLoweringChance; + int32 randomGearQualityLimit; + int32 randomGearScoreLimit; float randomBotMaxLevelChance; float randomBotRpgChance; uint32 minRandomBots, maxRandomBots; diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index d9f29740..8f95d9a7 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -149,7 +149,10 @@ void PlayerbotFactory::Prepare() { if (!itemQuality) { - itemQuality = ITEM_QUALITY_RARE; + uint32 gs = sPlayerbotAIConfig->randomGearScoreLimit == 0 ? 0 : + PlayerbotFactory::CalcMixedGearScore(sPlayerbotAIConfig->randomGearScoreLimit, sPlayerbotAIConfig->randomGearQualityLimit); + itemQuality = sPlayerbotAIConfig->randomGearScoreLimit; + gearScoreLimit = gs; } if (bot->isDead())