diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index b4e715f9..1bf88955 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -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 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 100bed92..d2a3ff8a 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -509,6 +509,7 @@ bool PlayerbotAIConfig::Initialize() randomBotAccountCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAccountCount", 0); deleteRandomBotAccounts = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotAccounts", false); randomBotGuildCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotGuildCount", 20); + randomBotGuildSizeMax = sConfigMgr->GetOption("AiPlayerbot.RandomBotGuildSizeMax", 15); deleteRandomBotGuilds = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotGuilds", false); guildTaskEnabled = sConfigMgr->GetOption("AiPlayerbot.EnableGuildTasks", true); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 13427698..48e1b864 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -267,7 +267,7 @@ public: uint32 randomBotAccountCount; bool randomBotRandomPassword; bool deleteRandomBotAccounts; - uint32 randomBotGuildCount; + uint32 randomBotGuildCount, randomBotGuildSizeMax; bool deleteRandomBotGuilds; std::vector randomBotGuilds; std::vector pvpProhibitedZoneIds; diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index f9a5d007..60b6ec69 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -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