mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Avoid creating accounts if both maxRandom & ClassBots are set to zero (#984)
Fix for https://github.com/liyunfan1223/mod-playerbots/issues/978
This commit is contained in:
@@ -401,9 +401,12 @@ uint32 RandomPlayerbotFactory::CalculateTotalAccountCount()
|
|||||||
|
|
||||||
// Checks if randomBotAccountCount is set, otherwise calculate it dynamically.
|
// Checks if randomBotAccountCount is set, otherwise calculate it dynamically.
|
||||||
if (sPlayerbotAIConfig->randomBotAccountCount > 0)
|
if (sPlayerbotAIConfig->randomBotAccountCount > 0)
|
||||||
{
|
|
||||||
return sPlayerbotAIConfig->randomBotAccountCount;
|
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;
|
bool isWOTLK = sWorld->getIntConfig(CONFIG_EXPANSION) == EXPANSION_WRATH_OF_THE_LICH_KING;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user