Implement level reset, bug fixes

This commit is contained in:
Mikhail
2024-07-27 17:06:19 -04:00
parent e185b7d87e
commit 8467a5fce9
6 changed files with 131 additions and 10 deletions

View File

@@ -139,7 +139,17 @@ namespace nksrv.Database
return num;
}
public int GenerateUniqueCharacterId()
{
var num = Rng.RandomId();
while (Characters.Any(x => x.Csn == num))
{
num = Rng.RandomId();
}
return num;
}
public bool IsStageCompleted(int id, bool isNorm)
{
foreach (var item in FieldInfoNew)
@@ -195,6 +205,11 @@ namespace nksrv.Database
else return false;
}
}
public bool HasCharacter(int c)
{
return Characters.Any(x => x.Tid == c);
}
}
public class CoreInfo
{