mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 02:53:48 +00:00
feat(Core/Utilities): add Seconds overload for randtime (#22337)
This commit is contained in:
@@ -69,6 +69,14 @@ Milliseconds randtime(Milliseconds min, Milliseconds max)
|
||||
return min + Milliseconds(urand(0, diff));
|
||||
}
|
||||
|
||||
Seconds randtime(Seconds min, Seconds max)
|
||||
{
|
||||
long long diff = max.count() - min.count();
|
||||
ASSERT(diff >= 0);
|
||||
ASSERT(diff <= (uint32) - 1);
|
||||
return min + Seconds(urand(0, diff));
|
||||
}
|
||||
|
||||
uint32 rand32()
|
||||
{
|
||||
return GetRng()->RandomUInt32();
|
||||
|
||||
Reference in New Issue
Block a user