mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Add lfg strategy to fix bots not giving leader in dungeon
This commit is contained in:
@@ -565,6 +565,9 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
|||||||
if (!urand(0, 3))
|
if (!urand(0, 3))
|
||||||
nonCombatEngine->addStrategy("start duel");
|
nonCombatEngine->addStrategy("start duel");
|
||||||
|
|
||||||
|
if (sPlayerbotAIConfig->randomBotJoinLfg)
|
||||||
|
nonCombatEngine->addStrategy("lfg");
|
||||||
|
|
||||||
if (!player->GetGroup() || player->GetGroup()->GetLeaderGUID() == player->GetGUID())
|
if (!player->GetGroup() || player->GetGroup()->GetLeaderGUID() == player->GetGUID())
|
||||||
{
|
{
|
||||||
// let 25% of random not grouped (or grp leader) bots help other players
|
// 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");
|
nonCombatEngine->addStrategy("rpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sPlayerbotAIConfig->randomBotJoinLfg)
|
|
||||||
nonCombatEngine->addStrategy("lfg");
|
|
||||||
|
|
||||||
if (sPlayerbotAIConfig->randomBotJoinBG)
|
if (sPlayerbotAIConfig->randomBotJoinBG)
|
||||||
nonCombatEngine->addStrategy("bg");
|
nonCombatEngine->addStrategy("bg");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user