Skip saving user settings when in dan mode
This commit is contained in:
parent
78989cb820
commit
d474416037
@ -182,6 +182,8 @@ public class PlayResultController : BaseController<PlayResultController>
|
||||
|
||||
userdata.ThrowIfNull($"User data is null! Baid: {request.BaidConf}");
|
||||
|
||||
var playMode = (PlayMode)playResultData.PlayMode;
|
||||
|
||||
userdata.Title = playResultData.Title;
|
||||
userdata.TitlePlateId = playResultData.TitleplateId;
|
||||
var costumeData = new List<uint>
|
||||
@ -194,12 +196,16 @@ public class PlayResultController : BaseController<PlayResultController>
|
||||
};
|
||||
userdata.CostumeData = JsonSerializer.Serialize(costumeData);
|
||||
|
||||
var lastStage = playResultData.AryStageInfoes.Last();
|
||||
var option = BinaryPrimitives.ReadInt16LittleEndian(lastStage.OptionFlg);
|
||||
userdata.OptionSetting = option;
|
||||
userdata.IsSkipOn = lastStage.IsSkipOn;
|
||||
userdata.IsVoiceOn = lastStage.IsVoiceOn;
|
||||
userdata.NotesPosition = lastStage.NotesPosition;
|
||||
// Skip user setting saving when in dan mode as dan mode uses its own default setting
|
||||
if (playMode != PlayMode.DanMode)
|
||||
{
|
||||
var lastStage = playResultData.AryStageInfoes.Last();
|
||||
var option = BinaryPrimitives.ReadInt16LittleEndian(lastStage.OptionFlg);
|
||||
userdata.OptionSetting = option;
|
||||
userdata.IsSkipOn = lastStage.IsSkipOn;
|
||||
userdata.IsVoiceOn = lastStage.IsVoiceOn;
|
||||
userdata.NotesPosition = lastStage.NotesPosition;
|
||||
}
|
||||
|
||||
userdata.LastPlayDatetime = lastPlayDatetime;
|
||||
userdata.LastPlayMode = playResultData.PlayMode;
|
||||
|
Loading…
Reference in New Issue
Block a user