Enable saving gaiden play result
This commit is contained in:
parent
c963809be6
commit
9ca00e038b
@ -4,6 +4,6 @@ public enum PlayMode
|
||||
{
|
||||
Normal = 0,
|
||||
DanMode = 1,
|
||||
// Not sure about this
|
||||
GaidenMode = 4,
|
||||
AiBattle = 6
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using GameDatabase.Entities;
|
||||
using System.Text.Json;
|
||||
using Serilog;
|
||||
using Throw;
|
||||
|
||||
namespace TaikoLocalServer.Controllers.Game;
|
||||
@ -97,6 +98,11 @@ public class BaidController : BaseController<BaidController>
|
||||
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<uint>();
|
||||
try
|
||||
{
|
||||
@ -148,7 +154,7 @@ public class BaidController : BaseController<BaidController>
|
||||
IsDispDanOn = userData.DisplayDan,
|
||||
GotDanMax = maxDan,
|
||||
GotDanFlg = gotDanFlagArray,
|
||||
GotDanextraFlg = new byte[20],
|
||||
GotDanextraFlg = gotGaidenFlagArray,
|
||||
DefaultToneSetting = userData.SelectedToneId,
|
||||
GenericInfoFlg = genericInfoFlgArray,
|
||||
AryCrownCounts = crownCount,
|
||||
|
@ -71,7 +71,7 @@ public class PlayResultController : BaseController<PlayResultController>
|
||||
|
||||
var playMode = (PlayMode)playResultData.PlayMode;
|
||||
|
||||
if (playMode == PlayMode.DanMode)
|
||||
if (playMode is PlayMode.DanMode or PlayMode.GaidenMode)
|
||||
{
|
||||
await UpdateDanPlayData(request, playResultData);
|
||||
return Ok(response);
|
||||
|
Loading…
Reference in New Issue
Block a user