mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Configuration] Gear quality on random bots
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -95,7 +95,10 @@ bool PlayerbotAIConfig::Initialize()
|
||||
autoAvoidAoe = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoAvoidAoe", true);
|
||||
tellWhenAvoidAoe = sConfigMgr->GetOption<bool>("AiPlayerbot.TellWhenAvoidAoe", true);
|
||||
|
||||
randomGearLoweringChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomGearLoweringChance", 0.15f);
|
||||
randomGearLoweringChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomGearLoweringChance", 0.0f);
|
||||
randomGearQualityLimit = sConfigMgr->GetOption<int32>("AiPlayerbot.AutoGearQualityLimit", 3);
|
||||
randomGearScoreLimit = sConfigMgr->GetOption<int32>("AiPlayerbot.AutoGearScoreLimit", 0);
|
||||
|
||||
randomBotMaxLevelChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotMaxLevelChance", 0.15f);
|
||||
randomBotRpgChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotRpgChance", 0.20f);
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@ class PlayerbotAIConfig
|
||||
std::vector<uint32> randomBotQuestIds;
|
||||
uint32 randomBotTeleportDistance;
|
||||
float randomGearLoweringChance;
|
||||
int32 randomGearQualityLimit;
|
||||
int32 randomGearScoreLimit;
|
||||
float randomBotMaxLevelChance;
|
||||
float randomBotRpgChance;
|
||||
uint32 minRandomBots, maxRandomBots;
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user