fix create random guild

This commit is contained in:
Bogir[rus]
2022-04-09 04:21:52 +05:00
committed by GitHub
parent 6e89ba391f
commit 0f5407e92e

View File

@@ -498,10 +498,7 @@ void RandomPlayerbotFactory::CreateRandomGuilds()
continue; continue;
if (sGuildMgr->GetGuildByName(guildName)) if (sGuildMgr->GetGuildByName(guildName))
{
LOG_WARN("playerbots", "GuildName %s is busy. Skipped...", guildName.c_str());
continue; continue;
}
if (availableLeaders.empty()) if (availableLeaders.empty())
{ {
@@ -518,6 +515,9 @@ void RandomPlayerbotFactory::CreateRandomGuilds()
continue; continue;
} }
if (player->GetGuildId())
continue;
Guild* guild = new Guild(); Guild* guild = new Guild();
if (!guild->Create(player, guildName)) if (!guild->Create(player, guildName))
{ {