diff --git a/EpinelPS/Data/GameData.cs b/EpinelPS/Data/GameData.cs index dc9a04f..0f2c29d 100644 --- a/EpinelPS/Data/GameData.cs +++ b/EpinelPS/Data/GameData.cs @@ -48,6 +48,9 @@ namespace EpinelPS.Data [LoadRecord("CampaignChapterTable.json", "Chapter")] public readonly Dictionary ChapterCampaignData = []; + [LoadRecord("ContentsOpenTable.json", "Id")] + public readonly Dictionary ContentsOpenTable = []; + [LoadRecord("CharacterCostumeTable.json", "Id")] public readonly Dictionary CharacterCostumeTable = []; diff --git a/EpinelPS/LobbyServer/Hexacode/GetAll.cs b/EpinelPS/LobbyServer/Hexacode/GetAll.cs new file mode 100644 index 0000000..289192c --- /dev/null +++ b/EpinelPS/LobbyServer/Hexacode/GetAll.cs @@ -0,0 +1,19 @@ +using EpinelPS.Utils; + +namespace EpinelPS.LobbyServer.Hexacode; + +[PacketPath("/hexacode/get-all")] +public class GetAll : LobbyMsgHandler +{ + protected override async Task HandleAsync() + { + ReqGetHexaAll req = await ReadData(); + User user = GetUser(); + + ResGetHexaAll response = new(); + + // TODO + + await WriteDataAsync(response); + } +} diff --git a/EpinelPS/LobbyServer/LobbyUser/GetContentsData.cs b/EpinelPS/LobbyServer/LobbyUser/GetContentsData.cs index 4a83669..c800b36 100644 --- a/EpinelPS/LobbyServer/LobbyUser/GetContentsData.cs +++ b/EpinelPS/LobbyServer/LobbyUser/GetContentsData.cs @@ -13,16 +13,21 @@ namespace EpinelPS.LobbyServer.LobbyUser // this request returns a list of "special" stages that mark when something is unlocked, ex: the shop or interception - List specialStages = [6003003, 6002008, 6002016, 6005003, 6003021, 6011018, 6007021, 6004018, 6005013, 6003009, 6003012, 6009017, 6016039, 6001004, 6000003, 6000001, 6002001, 6004023, 6005026, 6020050, 6006004, 6006023, 6022049]; - ResGetContentsOpenData response = new(); - foreach (FieldInfoNew field in user.FieldInfoNew.Values) + + foreach (var item in GameData.Instance.ContentsOpenTable) { - foreach (int stage in field.CompletedStages) + foreach (var condition in item.Value.OpenCondition) { - if (specialStages.Contains(stage)) - response.ClearStageList.Add(stage); + if (condition.OpenConditionType == ContentsOpenCondition.StageClear) + { + if (user.IsStageCompleted(condition.OpenConditionValue)) + { + response.ClearStageList.Add(condition.OpenConditionValue); + } + } } + } response.MaxGachaCount = user.GachaTutorialPlayCount; response.MaxGachaPremiumCount = user.GachaTutorialPlayCount; diff --git a/EpinelPS/LobbyServer/Surface/GetMaximumAmountAll.cs b/EpinelPS/LobbyServer/Surface/GetMaximumAmountAll.cs new file mode 100644 index 0000000..de61c4f --- /dev/null +++ b/EpinelPS/LobbyServer/Surface/GetMaximumAmountAll.cs @@ -0,0 +1,19 @@ +using EpinelPS.Utils; + +namespace EpinelPS.LobbyServer.Hexacode; + +[PacketPath("/Surface/Export/MaxAmount/All")] +public class GetMaximumAmountAll : LobbyMsgHandler +{ + protected override async Task HandleAsync() + { + ReqListAllSurfaceCurrencyMaxAmount req = await ReadData(); + User user = GetUser(); + + ResListAllSurfaceCurrencyMaxAmount response = new(); + + // TODO + + await WriteDataAsync(response); + } +} diff --git a/EpinelPS/LobbyServer/Surface/GetSimpleData.cs b/EpinelPS/LobbyServer/Surface/GetSimpleData.cs new file mode 100644 index 0000000..9d6fb65 --- /dev/null +++ b/EpinelPS/LobbyServer/Surface/GetSimpleData.cs @@ -0,0 +1,19 @@ +using EpinelPS.Utils; + +namespace EpinelPS.LobbyServer.Hexacode; + +[PacketPath("/surface/lobby/simpledata")] +public class GetSimpleData : LobbyMsgHandler +{ + protected override async Task HandleAsync() + { + ReqLobbySurfaceSimpleData req = await ReadData(); + User user = GetUser(); + + ResLobbySurfaceSimpleData response = new(); + + // TODO + + await WriteDataAsync(response); + } +} diff --git a/ServerSelector/ServerSwitcher.cs b/ServerSelector/ServerSwitcher.cs index 781b97a..b438272 100644 --- a/ServerSelector/ServerSwitcher.cs +++ b/ServerSelector/ServerSwitcher.cs @@ -57,7 +57,7 @@ namespace ServerSelector string certList1 = await File.ReadAllTextAsync(launcherCertList); if (!certList1.Contains("Good SSL Ca")) - return "Patch missing"; + return "SSL Cert Patch missing"; } if (File.Exists(gameCertList)) @@ -65,11 +65,10 @@ namespace ServerSelector string certList2 = await File.ReadAllTextAsync(gameCertList); if (!certList2.Contains("Good SSL Ca")) - return "Patch missing"; + return "SSL Cert Patch missing"; } // TODO: Check sodium lib - // TODO: Check if gameassembly was patched // TODO: check hosts file return "OK";