temporary disable rndbot group strategy

This commit is contained in:
Yunfan Li 2023-08-04 23:14:21 +08:00
parent 09566cb664
commit 6f8a8d9253
5 changed files with 64 additions and 63 deletions

View File

@ -547,7 +547,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("pvp");
// nonCombatEngine->addStrategy("collision");
nonCombatEngine->addStrategy("grind");
nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("guild");
if (sPlayerbotAIConfig->autoDoQuests)
@ -578,7 +578,7 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("pvp");
// nonCombatEngine->addStrategy("collision");
nonCombatEngine->addStrategy("grind");
nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("group");
// nonCombatEngine->addStrategy("guild");
if (sPlayerbotAIConfig->autoDoQuests)

View File

@ -523,8 +523,8 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
return "ok";
}
if (admin)
{
// if (admin)
// {
Player* bot = GetPlayerBot(guid);
if (!bot)
bot = sRandomPlayerbotMgr->GetPlayerBot(guid);
@ -532,8 +532,8 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
if (!bot)
return "bot not found";
if (!isRandomAccount || !isRandomBot) {
return "ERROR: You can not use this command on non-ramdom bot.";
if (!isRandomAccount || isRandomBot) {
return "ERROR: You can not use this command on summoned random bot.";
}
if (Player* master = GET_PLAYERBOT_AI(bot)->GetMaster())
@ -587,7 +587,7 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje
sRandomPlayerbotMgr->Randomize(bot);
return "ok";
}
}
// }
return "unknown command";
}
@ -883,7 +883,7 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
}
else if (master && member != master->GetGUID())
{
out << ProcessBotCommand(cmdStr, member, master->GetGUID(), true, master->GetSession()->GetAccountId(), master->GetGuildId());
out << ProcessBotCommand(cmdStr, member, master->GetGUID(), master->GetSession()->GetSecurity() >= SEC_GAMEMASTER, master->GetSession()->GetAccountId(), master->GetGuildId());
}
else if (!master)
{

View File

@ -941,7 +941,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player)
uint32 teleport = GetEventValue(bot, "teleport");
if (!teleport)
{
LOG_INFO("players", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName());
LOG_INFO("playerbots", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName());
Refresh(player);
RandomTeleportForLevel(player);
uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, sPlayerbotAIConfig->maxRandomBotTeleportInterval);
@ -1490,8 +1490,8 @@ bool RandomPlayerbotMgr::IsRandomBot(Player* bot)
bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot)
{
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(bot);
if (sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid)))
return true;
if (!sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid)))
return false;
return GetEventValue(bot, "add");
}

View File

@ -135,6 +135,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
if (!IsMovingAllowed(mapId, x, y, z)) {
return false;
}
UpdateMovementState();
// if (bot->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_FALLING_FAR)) {
// bot->Say("I'm falling!, flag:" + std::to_string(bot->m_movementInfo.GetMovementFlags()), LANG_UNIVERSAL);
// return false;
@ -166,7 +167,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
}
return false;
// UpdateMovementState();
//
// // LOG_DEBUG("playerbots", "IsMovingAllowed {}", IsMovingAllowed());
// bot->AddUnitMovementFlag()

View File

@ -13,7 +13,7 @@ class PlayerbotAI;
class LootStrategyValue : public ManualSetValue<LootStrategy*>
{
public:
LootStrategyValue(PlayerbotAI* botAI, std::string const name = "loot strategy") : ManualSetValue<LootStrategy*>(botAI, all, name) { }
LootStrategyValue(PlayerbotAI* botAI, std::string const name = "loot strategy") : ManualSetValue<LootStrategy*>(botAI, normal, name) { }
virtual ~LootStrategyValue();
std::string const Save() override;