Allow addclass bots that are not in a real guild (#970)

This commit is contained in:
Yunfan Li
2025-02-15 01:45:17 +08:00
committed by GitHub
parent 4793644a15
commit 49b046f36c
3 changed files with 13 additions and 6 deletions

View File

@@ -1055,7 +1055,8 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
continue;
if (ObjectAccessor::FindConnectedPlayer(guid))
continue;
if (sCharacterCache->GetCharacterGuildIdByGuid(guid))
uint32 guildId = sCharacterCache->GetCharacterGuildIdByGuid(guid);
if (guildId && PlayerbotAI::IsRealGuild(guildId))
continue;
AddPlayerBot(guid, master->GetSession()->GetAccountId());
messages.push_back("Add class " + std::string(charname));