mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Remove " " space from the names
This commit is contained in:
parent
bef3032886
commit
8e451633dc
59 changed files with 391 additions and 391 deletions
22
Horse Isle Server/HorseIsleServer/Security/RandomID.cs
Normal file
22
Horse Isle Server/HorseIsleServer/Security/RandomID.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
namespace HISP.Security
|
||||
{
|
||||
class RandomID
|
||||
{
|
||||
private static int prevId = 0;
|
||||
public static int NextRandomId(int randomId=-1)
|
||||
{
|
||||
int rndmId = 0;
|
||||
|
||||
if (randomId == -1)
|
||||
rndmId = prevId+1;
|
||||
else
|
||||
rndmId = randomId;
|
||||
|
||||
if (rndmId >= prevId)
|
||||
prevId = rndmId;
|
||||
|
||||
return rndmId;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue