Core/Util: Remove EventMap's non TimeSpan based interface
Port From (https://github.com/TrinityCore/TrinityCore/commit/cd86a015c46f8da581f86857e313d9c596dba7fa)
This commit is contained in:
@@ -103,5 +103,13 @@ public class RandomHelper
|
||||
|
||||
return args[randIndex];
|
||||
}
|
||||
|
||||
public static TimeSpan RandTime(TimeSpan min, TimeSpan max)
|
||||
{
|
||||
double diff = max.TotalMilliseconds - min.TotalMilliseconds;
|
||||
Cypher.Assert(diff >= 0);
|
||||
Cypher.Assert(diff <= 0xFFFFFFFF);
|
||||
return min + TimeSpan.FromMilliseconds(URand(0, (uint)diff));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user