mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Enable new rpg strategy by default (#1192)
* Add RandomBotMinLevelChance * Save mana only for healer * Disable addclass dk for low level player * Target selection and debuff cast with less players in group * Change default rpg strategy and bots count in config * Logs clean up * Improve init=auto * Remove login logs after initialization * Rndbots stats for quest * Prediction chase in reach combat * Poor & Normal items ensurence for init=auto
This commit is contained in:
@@ -275,7 +275,7 @@ void PlayerbotHolder::LogoutPlayerBot(ObjectGuid guid)
|
||||
sPlayerbotDbStore->Save(botAI);
|
||||
}
|
||||
|
||||
LOG_INFO("playerbots", "Bot {} logging out", bot->GetName().c_str());
|
||||
LOG_DEBUG("playerbots", "Bot {} logging out", bot->GetName().c_str());
|
||||
bot->SaveToDB(false, false);
|
||||
|
||||
WorldSession* botWorldSessionPtr = bot->GetSession();
|
||||
@@ -543,12 +543,15 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
|
||||
|
||||
bot->SaveToDB(false, false);
|
||||
bool addClassBot = sRandomPlayerbotMgr->IsAddclassBot(bot->GetGUID().GetCounter());
|
||||
if (addClassBot && master && isRandomAccount && master->GetLevel() < bot->GetLevel())
|
||||
if (addClassBot && master && isRandomAccount && abs((int)master->GetLevel() - (int)bot->GetLevel()) > 3)
|
||||
{
|
||||
// PlayerbotFactory factory(bot, master->GetLevel());
|
||||
// factory.Randomize(false);
|
||||
uint32 mixedGearScore =
|
||||
PlayerbotAI::GetMixedGearScore(master, true, false, 12) * sPlayerbotAIConfig->autoInitEquipLevelLimitRatio;
|
||||
// work around: distinguish from 0 if no gear
|
||||
if (mixedGearScore == 0)
|
||||
mixedGearScore = 1;
|
||||
PlayerbotFactory factory(bot, master->GetLevel(), ITEM_QUALITY_LEGENDARY, mixedGearScore);
|
||||
factory.Randomize(false);
|
||||
}
|
||||
@@ -728,6 +731,9 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
|
||||
{
|
||||
uint32 mixedGearScore = PlayerbotAI::GetMixedGearScore(master, true, false, 12) *
|
||||
sPlayerbotAIConfig->autoInitEquipLevelLimitRatio;
|
||||
// work around: distinguish from 0 if no gear
|
||||
if (mixedGearScore == 0)
|
||||
mixedGearScore = 1;
|
||||
PlayerbotFactory factory(bot, master->GetLevel(), ITEM_QUALITY_LEGENDARY, mixedGearScore);
|
||||
factory.Randomize(false);
|
||||
return "ok, gear score limit: " + std::to_string(mixedGearScore / PlayerbotAI::GetItemScoreMultiplier(ItemQualities(ITEM_QUALITY_EPIC))) +
|
||||
@@ -1051,6 +1057,11 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
messages.push_back("Error: Invalid Class. Try again.");
|
||||
return messages;
|
||||
}
|
||||
if (claz == 6 && master->GetLevel() < sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL))
|
||||
{
|
||||
messages.push_back("Your level is too low to summon Deathknight");
|
||||
return messages;
|
||||
}
|
||||
uint8 teamId = master->GetTeamId(true);
|
||||
const std::unordered_set<ObjectGuid> &guidCache = sRandomPlayerbotMgr->addclassCache[RandomPlayerbotMgr::GetTeamClassIdx(teamId == TEAM_ALLIANCE, claz)];
|
||||
for (const ObjectGuid &guid: guidCache)
|
||||
|
||||
Reference in New Issue
Block a user