From 57d05d64f729142ee028db79c0186f877eb5d620 Mon Sep 17 00:00:00 2001 From: S-Sebb?? Date: Sat, 16 Sep 2023 00:28:37 +0800 Subject: [PATCH] Reimplemented getSongIntroduction and getFolder in InitialDataCheck --- TaikoLocalServer/Common/Utils/JsonHelper.cs | 1 + .../Game/InitialDataCheckController.cs | 46 +++++++++++++++---- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/TaikoLocalServer/Common/Utils/JsonHelper.cs b/TaikoLocalServer/Common/Utils/JsonHelper.cs index 49549d7..83c87fb 100644 --- a/TaikoLocalServer/Common/Utils/JsonHelper.cs +++ b/TaikoLocalServer/Common/Utils/JsonHelper.cs @@ -10,6 +10,7 @@ public static class JsonHelper var costumeData = new List { 0, 0, 0, 0, 0 }; try { + // logger.LogInformation(userData.CostumeData); costumeData = JsonSerializer.Deserialize>(userData.CostumeData); } catch (JsonException e) diff --git a/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs b/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs index 8c16e1a..431b016 100644 --- a/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs +++ b/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs @@ -31,7 +31,7 @@ public class InitialDataCheckController : BaseController new InitialdatacheckResponse.VerupNoData1 { MasterType = i, @@ -58,18 +58,46 @@ public class InitialDataCheckController : BaseController(); + foreach (var folderId in Constants.EVENT_FOLDER_IDS) + { + eventFolderData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData { - MasterType = i, - }; - verUp2.AryInformationDatas.AddRange(danData); - response.AryVerupNoData2s.Add(verUp2); + InfoId = (uint)folderId, + VerupNo = 1 + }); } - response.AryChassisFunctionIds = new uint[] {1,2,3}; + var verUp2Type102 = new InitialdatacheckResponse.VerupNoData2 + { + MasterType = 102, + }; + verUp2Type102.AryInformationDatas.AddRange(eventFolderData); + response.AryVerupNoData2s.Add(verUp2Type102); + var songIntroData = new List(); + var verUp2Type105 = new InitialdatacheckResponse.VerupNoData2 + { + MasterType = 105, + }; + for (var setId = 1; setId <= gameDataService.GetSongIntroDictionary().Count; setId++) + { + songIntroData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData + { + InfoId = (uint)setId, + VerupNo = 1 + }); + } + verUp2Type105.AryInformationDatas.AddRange(songIntroData); + response.AryVerupNoData2s.Add(verUp2Type105); + + response.AryChassisFunctionIds = new uint[] {1,2,3}; return Ok(response); }