diff --git a/SharedProject/Enums/PlayMode.cs b/SharedProject/Enums/PlayMode.cs index 958a0f6..d53a498 100644 --- a/SharedProject/Enums/PlayMode.cs +++ b/SharedProject/Enums/PlayMode.cs @@ -4,6 +4,6 @@ public enum PlayMode { Normal = 0, DanMode = 1, - // Not sure about this + GaidenMode = 4, AiBattle = 6 } \ No newline at end of file diff --git a/TaikoLocalServer/Controllers/Game/BaidController.cs b/TaikoLocalServer/Controllers/Game/BaidController.cs index b1678aa..81a24c9 100644 --- a/TaikoLocalServer/Controllers/Game/BaidController.cs +++ b/TaikoLocalServer/Controllers/Game/BaidController.cs @@ -1,5 +1,6 @@ using GameDatabase.Entities; using System.Text.Json; +using Serilog; using Throw; namespace TaikoLocalServer.Controllers.Game; @@ -96,6 +97,11 @@ public class BaidController : BaseController var danDataDictionary = gameDataService.GetDanDataDictionary(); var danIdList = danDataDictionary.Keys.ToList(); var gotDanFlagArray = FlagCalculator.ComputeGotDanFlags(danData, danIdList); + + var gaidenDataDictionary = gameDataService.GetGaidenDataDictionary(); + var gaidenIdList = gaidenDataDictionary.Keys.ToList(); + danIdList.AddRange(gaidenIdList); + var gotGaidenFlagArray = FlagCalculator.ComputeGotDanFlags(danData, danIdList); var genericInfoFlg = Array.Empty(); try @@ -148,7 +154,7 @@ public class BaidController : BaseController IsDispDanOn = userData.DisplayDan, GotDanMax = maxDan, GotDanFlg = gotDanFlagArray, - GotDanextraFlg = new byte[20], + GotDanextraFlg = gotGaidenFlagArray, DefaultToneSetting = userData.SelectedToneId, GenericInfoFlg = genericInfoFlgArray, AryCrownCounts = crownCount, diff --git a/TaikoLocalServer/Controllers/Game/PlayResultController.cs b/TaikoLocalServer/Controllers/Game/PlayResultController.cs index 5274b85..f6e33b1 100644 --- a/TaikoLocalServer/Controllers/Game/PlayResultController.cs +++ b/TaikoLocalServer/Controllers/Game/PlayResultController.cs @@ -71,7 +71,7 @@ public class PlayResultController : BaseController var playMode = (PlayMode)playResultData.PlayMode; - if (playMode == PlayMode.DanMode) + if (playMode is PlayMode.DanMode or PlayMode.GaidenMode) { await UpdateDanPlayData(request, playResultData); return Ok(response);