From 01eb0e64345c4c2e499bc0b9b7b5dec3f6cb5947 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 22 Jun 2024 18:12:06 +0800 Subject: [PATCH] [Random bots] Miscs --- src/PlayerbotFactory.cpp | 2 +- src/RandomPlayerbotMgr.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index b32fa397..84642bc5 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -2617,7 +2617,7 @@ void PlayerbotFactory::InitPotions() uint32 itemId = sRandomItemMgr->GetRandomPotion(level, effect); if (!itemId) { - LOG_INFO("playerbots", "No potions (type {}) available for bot {} ({} level)", effect, bot->GetName().c_str(), bot->getLevel()); + // LOG_INFO("playerbots", "No potions (type {}) available for bot {} ({} level)", effect, bot->GetName().c_str(), bot->getLevel()); continue; } diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 14a11e32..f7ff76cc 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1524,7 +1524,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot) uint32 level; - if (sPlayerbotAIConfig->downgradeMaxLevelBot && bot->GetLevel() == sPlayerbotAIConfig->randomBotMaxLevel) { + if (sPlayerbotAIConfig->downgradeMaxLevelBot && bot->GetLevel() >= sPlayerbotAIConfig->randomBotMaxLevel) { if (bot->getClass() == CLASS_DEATH_KNIGHT) { level = sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL); } else { @@ -1532,7 +1532,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot) } } else { level = urand(sPlayerbotAIConfig->randomBotMinLevel, maxLevel); - if (urand(0, 100) < 100 * sPlayerbotAIConfig->randomBotMaxLevelChance) + if (urand(1, 100) < 100 * sPlayerbotAIConfig->randomBotMaxLevelChance) level = maxLevel; if (bot->getClass() == CLASS_DEATH_KNIGHT)