mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 11:15:43 +00:00
[Configuration] Gear quality on random bots
This commit is contained in:
@@ -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