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