diff --git a/src/RandomPlayerbotFactory.cpp b/src/RandomPlayerbotFactory.cpp index bd4dab5c..761be7dc 100644 --- a/src/RandomPlayerbotFactory.cpp +++ b/src/RandomPlayerbotFactory.cpp @@ -401,9 +401,12 @@ uint32 RandomPlayerbotFactory::CalculateTotalAccountCount() // Checks if randomBotAccountCount is set, otherwise calculate it dynamically. if (sPlayerbotAIConfig->randomBotAccountCount > 0) - { return sPlayerbotAIConfig->randomBotAccountCount; - } + + // Avoid creating accounts if both maxRandom & ClassBots are set to zero. + if (sPlayerbotAIConfig->maxRandomBots == 0 && + sPlayerbotAIConfig->addClassAccountPoolSize == 0) + return 0; bool isWOTLK = sWorld->getIntConfig(CONFIG_EXPANSION) == EXPANSION_WRATH_OF_THE_LICH_KING;