Fix real guild check

This commit is contained in:
郑佩茹
2022-09-26 11:09:57 -06:00
parent bd909ca92a
commit 660fd2a0c1

View File

@@ -3517,9 +3517,13 @@ bool PlayerbotAI::IsInRealGuild()
return false;
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
if (!guild)
{
return false;
}
uint32 leaderAccount = sCharacterCache->GetCharacterAccountIdByGuid(guild->GetLeaderGUID());
if (!leaderAccount)
return false;
return sPlayerbotAIConfig->IsInRandomAccountList(leaderAccount);
return !(sPlayerbotAIConfig->IsInRandomAccountList(leaderAccount));
}