dps estimation

This commit is contained in:
Yunfan Li
2023-10-10 23:23:52 +08:00
parent 451ec93e92
commit 417c5bbc93
6 changed files with 52 additions and 20 deletions

View File

@@ -551,6 +551,7 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
if (master->GetSession()->GetSecurity() <= SEC_PLAYER && sPlayerbotAIConfig->autoInitOnly && cmd != "init=auto") {
return "The command is not allowed, use init=auto instead.";
}
int gs;
if (cmd == "init=white" || cmd == "init=common")
{
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_NORMAL);
@@ -588,6 +589,13 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
factory.Randomize(false);
return "ok, gear score limit: " + std::to_string(mixedGearScore / (ITEM_QUALITY_EPIC + 1)) + "(for epic)";
}
else if (cmd.starts_with("init=") && sscanf(cmd.c_str(), "init=%d", &gs) != -1)
{
// uint32 mixedGearScore = PlayerbotAI::GetMixedGearScore(master, false, false, 12) * sPlayerbotAIConfig->autoInitEquipLevelLimitRatio;
PlayerbotFactory factory(bot, master->getLevel(), ITEM_QUALITY_LEGENDARY, gs);
factory.Randomize(false);
return "ok, gear score limit: " + std::to_string(gs / (ITEM_QUALITY_EPIC + 1)) + "(for epic)";
}
}
if (cmd == "levelup" || cmd == "level")