Config option to set max number of guild members in random bot guilds

This commit is contained in:
Iain Donnelly
2025-09-28 14:04:09 +01:00
parent b0f3de65f5
commit 6f79193d7a
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