mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
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:
@@ -159,6 +159,9 @@ AiPlayerbot.RandomBotGuildNearby = 0
|
|||||||
# Number of guilds created by randombots
|
# Number of guilds created by randombots
|
||||||
AiPlayerbot.RandomBotGuildCount = 20
|
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
|
# Delete all randombot guilds if set to 1
|
||||||
AiPlayerbot.DeleteRandomBotGuilds = 0
|
AiPlayerbot.DeleteRandomBotGuilds = 0
|
||||||
|
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 0);
|
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 0);
|
||||||
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
|
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
|
||||||
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
|
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
|
||||||
|
randomBotGuildSizeMax = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildSizeMax", 15);
|
||||||
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
|
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
|
||||||
|
|
||||||
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);
|
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ public:
|
|||||||
uint32 randomBotAccountCount;
|
uint32 randomBotAccountCount;
|
||||||
bool randomBotRandomPassword;
|
bool randomBotRandomPassword;
|
||||||
bool deleteRandomBotAccounts;
|
bool deleteRandomBotAccounts;
|
||||||
uint32 randomBotGuildCount;
|
uint32 randomBotGuildCount, randomBotGuildSizeMax;
|
||||||
bool deleteRandomBotGuilds;
|
bool deleteRandomBotGuilds;
|
||||||
std::vector<uint32> randomBotGuilds;
|
std::vector<uint32> randomBotGuilds;
|
||||||
std::vector<uint32> pvpProhibitedZoneIds;
|
std::vector<uint32> pvpProhibitedZoneIds;
|
||||||
|
|||||||
@@ -3992,7 +3992,7 @@ void PlayerbotFactory::InitGuild()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guild->GetMemberSize() < urand(10, 15))
|
if (guild->GetMemberSize() < urand(10, sPlayerbotAIConfig->randomBotGuildSizeMax))
|
||||||
guild->AddMember(bot->GetGUID(), urand(GR_OFFICER, GR_INITIATE));
|
guild->AddMember(bot->GetGUID(), urand(GR_OFFICER, GR_INITIATE));
|
||||||
|
|
||||||
// add guild tabard
|
// add guild tabard
|
||||||
|
|||||||
Reference in New Issue
Block a user