Fix some case of bots AFK

This commit is contained in:
郑佩茹
2022-06-22 10:11:14 -06:00
parent 6fe225f109
commit 623fcb847c

View File

@@ -840,7 +840,7 @@ void PlayerbotAI::DoNextAction(bool min)
if (minimal) if (minimal)
{ {
if (!bot->isAFK() && !bot->InBattleground() && (!HasRealPlayerMaster() || (GetMaster() && GetMaster()->isAFK()))) if (!bot->isAFK() && !bot->InBattleground() && !HasRealPlayerMaster())
bot->ToggleAFK(); bot->ToggleAFK();
SetNextCheckDelay(sPlayerbotAIConfig->passiveDelay); SetNextCheckDelay(sPlayerbotAIConfig->passiveDelay);
@@ -2630,7 +2630,8 @@ bool PlayerbotAI::AllowActive(ActivityType activityType)
return true; return true;
if (group->IsLeader(member->GetGUID())) if (group->IsLeader(member->GetGUID()))
return memberBotAI->AllowActivity(PARTY_ACTIVITY); if (!memberBotAI->AllowActivity(PARTY_ACTIVITY))
return false;
} }
} }