Merge pull request #1681 from IainD92/GuildSizeConfig

Config option to set max number of guild members in random bot guilds
This commit is contained in:
kadeshar
2025-09-28 19:45:29 +02:00
committed by GitHub
4 changed files with 6 additions and 2 deletions

View File

@@ -159,6 +159,9 @@ AiPlayerbot.RandomBotGuildNearby = 0
# Number of guilds created by randombots
AiPlayerbot.RandomBotGuildCount = 20
# Maximum number of members in randombot guilds (minimum is hardcoded to 10)
AiPlayerbot.RandomBotGuildSizeMax = 15
# Delete all randombot guilds if set to 1
AiPlayerbot.DeleteRandomBotGuilds = 0

View File

@@ -509,6 +509,7 @@ bool PlayerbotAIConfig::Initialize()
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 0);
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
randomBotGuildSizeMax = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildSizeMax", 15);
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);

View File

@@ -267,7 +267,7 @@ public:
uint32 randomBotAccountCount;
bool randomBotRandomPassword;
bool deleteRandomBotAccounts;
uint32 randomBotGuildCount;
uint32 randomBotGuildCount, randomBotGuildSizeMax;
bool deleteRandomBotGuilds;
std::vector<uint32> randomBotGuilds;
std::vector<uint32> pvpProhibitedZoneIds;

View File

@@ -3992,7 +3992,7 @@ void PlayerbotFactory::InitGuild()
return;
}
if (guild->GetMemberSize() < urand(10, 15))
if (guild->GetMemberSize() < urand(10, sPlayerbotAIConfig->randomBotGuildSizeMax))
guild->AddMember(bot->GetGUID(), urand(GR_OFFICER, GR_INITIATE));
// add guild tabard