Fix random_shuffle compile error

This commit is contained in:
Yunfan Li
2024-01-15 21:17:31 +08:00
parent dc4ec06164
commit 32eec3ebf1

View File

@@ -33,6 +33,7 @@
#include <cstdlib>
#include <iomanip>
#include <boost/thread/thread.hpp>
#include <random>
void PrintStatsThread()
{
@@ -368,7 +369,8 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
guids.push_back(guid);
} while (result->NextRow());
std::random_shuffle(guids.begin(), guids.end());
std::mt19937 rnd(time(0));
std::shuffle(guids.begin(), guids.end(), rnd);
for (uint32 &guid : guids) {
uint32 add_time = sPlayerbotAIConfig->enableRotation ?