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

View File

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

View File

@@ -941,7 +941,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player)
uint32 teleport = GetEventValue(bot, "teleport"); uint32 teleport = GetEventValue(bot, "teleport");
if (!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); Refresh(player);
RandomTeleportForLevel(player); RandomTeleportForLevel(player);
uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, sPlayerbotAIConfig->maxRandomBotTeleportInterval); uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, sPlayerbotAIConfig->maxRandomBotTeleportInterval);
@@ -1490,8 +1490,8 @@ bool RandomPlayerbotMgr::IsRandomBot(Player* bot)
bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot) bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot)
{ {
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(bot); ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(bot);
if (sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid))) if (!sPlayerbotAIConfig->IsInRandomAccountList(sCharacterCache->GetCharacterAccountIdByGuid(guid)))
return true; return false;
return GetEventValue(bot, "add"); 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)) { if (!IsMovingAllowed(mapId, x, y, z)) {
return false; return false;
} }
UpdateMovementState();
// if (bot->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_FALLING_FAR)) { // 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); // bot->Say("I'm falling!, flag:" + std::to_string(bot->m_movementInfo.GetMovementFlags()), LANG_UNIVERSAL);
// return false; // return false;
@@ -166,7 +167,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
} }
return false; return false;
// UpdateMovementState(); //
// // LOG_DEBUG("playerbots", "IsMovingAllowed {}", IsMovingAllowed()); // // LOG_DEBUG("playerbots", "IsMovingAllowed {}", IsMovingAllowed());
// bot->AddUnitMovementFlag() // bot->AddUnitMovementFlag()

View File

@@ -13,7 +13,7 @@ class PlayerbotAI;
class LootStrategyValue : public ManualSetValue<LootStrategy*> class LootStrategyValue : public ManualSetValue<LootStrategy*>
{ {
public: 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(); virtual ~LootStrategyValue();
std::string const Save() override; std::string const Save() override;