From 623fcb847c3917ac412dfac4d4ba1217793956ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Wed, 22 Jun 2022 10:11:14 -0600 Subject: [PATCH] Fix some case of bots AFK --- src/PlayerbotAI.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 6e082bd2..6fdedc7c 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -840,7 +840,7 @@ void PlayerbotAI::DoNextAction(bool min) if (minimal) { - if (!bot->isAFK() && !bot->InBattleground() && (!HasRealPlayerMaster() || (GetMaster() && GetMaster()->isAFK()))) + if (!bot->isAFK() && !bot->InBattleground() && !HasRealPlayerMaster()) bot->ToggleAFK(); SetNextCheckDelay(sPlayerbotAIConfig->passiveDelay); @@ -2630,7 +2630,8 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) return true; if (group->IsLeader(member->GetGUID())) - return memberBotAI->AllowActivity(PARTY_ACTIVITY); + if (!memberBotAI->AllowActivity(PARTY_ACTIVITY)) + return false; } }