mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-15 16:34:40 +01:00
Implement stage skipping
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using ASodium;
|
||||
using Newtonsoft.Json;
|
||||
using nksrv.LobbyServer;
|
||||
using nksrv.LobbyServer.Msgs.Stage;
|
||||
using nksrv.StaticInfo;
|
||||
using Swan.Logging;
|
||||
using System;
|
||||
@@ -135,6 +136,24 @@ namespace nksrv.Utils
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
public bool IsStageCompleted(int id, bool isNorm)
|
||||
{
|
||||
foreach (var item in FieldInfo)
|
||||
{
|
||||
if (item.Key.Contains("hard") && isNorm) continue;
|
||||
if (item.Key.Contains("normal") && !isNorm) continue;
|
||||
foreach (var s in item.Value.CompletedStages)
|
||||
{
|
||||
if (s.StageId == id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public class CoreInfo
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user