mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-06 12:03:39 +00:00
13 lines
307 B
C++
13 lines
307 B
C++
#include <set>
|
|
#include <Impl/ObjectivePacketHelper.h>
|
|
std::set<uint64_t> scoreIds;
|
|
|
|
#define RAND_SCORE_ID() (uint64_t)((rand() << 16) + rand() + 1145140)
|
|
|
|
uint64_t NewScoreId() {
|
|
uint64_t Id = 0;
|
|
do {
|
|
Id = RAND_SCORE_ID();
|
|
} while (scoreIds.find(Id) != scoreIds.end());
|
|
return Id;
|
|
} |