rewrite random bot accounts deletion

This commit is contained in:
Yunfan Li
2023-08-09 23:10:58 +08:00
parent 3aef47aa85
commit 8c9ab0e428
2 changed files with 74 additions and 167 deletions

View File

@@ -799,11 +799,11 @@ bool RandomPlayerbotMgr::ProcessBot(uint32 bot)
// do not randomize or teleport immediately after server start (prevent lagging)
if (!GetEventValue(bot, "randomize")) {
randomTime = urand(sPlayerbotAIConfig->randomBotUpdateInterval, sPlayerbotAIConfig->randomBotUpdateInterval * 10);
randomTime = urand(sPlayerbotAIConfig->randomBotUpdateInterval * 5, sPlayerbotAIConfig->randomBotUpdateInterval * 20);
ScheduleRandomize(bot, randomTime);
}
if (!GetEventValue(bot, "teleport")) {
randomTime = urand(sPlayerbotAIConfig->randomBotUpdateInterval, sPlayerbotAIConfig->randomBotUpdateInterval * 10);
randomTime = urand(sPlayerbotAIConfig->randomBotUpdateInterval * 5, sPlayerbotAIConfig->randomBotUpdateInterval * 20);
ScheduleTeleport(bot, randomTime);
}
return true;