[Random bots] Miscs

This commit is contained in:
Yunfan Li
2024-06-22 18:12:06 +08:00
parent 78aa2551ef
commit 01eb0e6434
2 changed files with 3 additions and 3 deletions

View File

@@ -2617,7 +2617,7 @@ void PlayerbotFactory::InitPotions()
uint32 itemId = sRandomItemMgr->GetRandomPotion(level, effect); uint32 itemId = sRandomItemMgr->GetRandomPotion(level, effect);
if (!itemId) 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; continue;
} }

View File

@@ -1524,7 +1524,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot)
uint32 level; uint32 level;
if (sPlayerbotAIConfig->downgradeMaxLevelBot && bot->GetLevel() == sPlayerbotAIConfig->randomBotMaxLevel) { if (sPlayerbotAIConfig->downgradeMaxLevelBot && bot->GetLevel() >= sPlayerbotAIConfig->randomBotMaxLevel) {
if (bot->getClass() == CLASS_DEATH_KNIGHT) { if (bot->getClass() == CLASS_DEATH_KNIGHT) {
level = sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL); level = sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
} else { } else {
@@ -1532,7 +1532,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot)
} }
} else { } else {
level = urand(sPlayerbotAIConfig->randomBotMinLevel, maxLevel); level = urand(sPlayerbotAIConfig->randomBotMinLevel, maxLevel);
if (urand(0, 100) < 100 * sPlayerbotAIConfig->randomBotMaxLevelChance) if (urand(1, 100) < 100 * sPlayerbotAIConfig->randomBotMaxLevelChance)
level = maxLevel; level = maxLevel;
if (bot->getClass() == CLASS_DEATH_KNIGHT) if (bot->getClass() == CLASS_DEATH_KNIGHT)