Only invoke InitGuild when randomBotGuildCount > 0 (#975)

* Only invoke InitGuild when randomBotGuildCount > 0

* Moved Random bot guild count/delete to more appropriate section of config.
This commit is contained in:
SaW
2025-02-16 13:42:15 +01:00
committed by GitHub
parent 6749a4257b
commit 58a596a40e
2 changed files with 11 additions and 8 deletions

View File

@@ -132,6 +132,12 @@ AiPlayerbot.AllowAccountBots = 1
# Allow/deny bots in the player's guild # Allow/deny bots in the player's guild
AiPlayerbot.AllowGuildBots = 1 AiPlayerbot.AllowGuildBots = 1
# Random bot guild count
AiPlayerbot.RandomBotGuildCount = 20
# Delete all random bot guilds
AiPlayerbot.DeleteRandomBotGuilds = 0
# Randombots will invite nearby bots to guilds # Randombots will invite nearby bots to guilds
AiPlayerbot.RandomBotGuildNearby = 0 AiPlayerbot.RandomBotGuildNearby = 0
@@ -1622,12 +1628,6 @@ AiPlayerbot.EnableGuildTasks = 0
# Enable dungeon suggestions in lower case randomly # Enable dungeon suggestions in lower case randomly
AiPlayerbot.SuggestDungeonsInLowerCaseRandomly = 0 AiPlayerbot.SuggestDungeonsInLowerCaseRandomly = 0
# Random bot guild count
AiPlayerbot.RandomBotGuildCount = 20
# Delete all random bot guilds
AiPlayerbot.DeleteRandomBotGuilds = 0
# Chance bot chooses RPG (Teleport to random camp for their level) instead of grinding # Chance bot chooses RPG (Teleport to random camp for their level) instead of grinding
AiPlayerbot.RandomBotRpgChance = 0.20 AiPlayerbot.RandomBotRpgChance = 0.20

View File

@@ -392,9 +392,12 @@ void PlayerbotFactory::Randomize(bool incremental)
// bot->SaveToDB(false, false); // bot->SaveToDB(false, false);
// pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Guilds"); // pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Guilds");
// LOG_INFO("playerbots", "Initializing guilds...");
// bot->SaveToDB(false, false); // bot->SaveToDB(false, false);
InitGuild(); if (sPlayerbotAIConfig->randomBotGuildCount > 0)
{
LOG_INFO("playerbots", "Initializing guilds...");
InitGuild();
}
// bot->SaveToDB(false, false); // bot->SaveToDB(false, false);
// if (pmo) // if (pmo)
// pmo->finish(); // pmo->finish();