Add lfg strategy to fix bots not giving leader in dungeon

This commit is contained in:
郑佩茹
2023-04-04 13:34:57 -06:00
parent ad72b256bf
commit e1f8a849e4

View File

@@ -565,6 +565,9 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
if (!urand(0, 3))
nonCombatEngine->addStrategy("start duel");
if (sPlayerbotAIConfig->randomBotJoinLfg)
nonCombatEngine->addStrategy("lfg");
if (!player->GetGroup() || player->GetGroup()->GetLeaderGUID() == player->GetGUID())
{
// let 25% of random not grouped (or grp leader) bots help other players
@@ -583,9 +586,6 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("rpg");
}
if (sPlayerbotAIConfig->randomBotJoinLfg)
nonCombatEngine->addStrategy("lfg");
if (sPlayerbotAIConfig->randomBotJoinBG)
nonCombatEngine->addStrategy("bg");