mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix real guild check
This commit is contained in:
@@ -3517,9 +3517,13 @@ bool PlayerbotAI::IsInRealGuild()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
|
Guild* guild = sGuildMgr->GetGuildById(bot->GetGuildId());
|
||||||
|
if (!guild)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
uint32 leaderAccount = sCharacterCache->GetCharacterAccountIdByGuid(guild->GetLeaderGUID());
|
uint32 leaderAccount = sCharacterCache->GetCharacterAccountIdByGuid(guild->GetLeaderGUID());
|
||||||
if (!leaderAccount)
|
if (!leaderAccount)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return sPlayerbotAIConfig->IsInRandomAccountList(leaderAccount);
|
return !(sPlayerbotAIConfig->IsInRandomAccountList(leaderAccount));
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user