1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Fix SoloScoreInfo.Rank not being serialised if rank is D

This commit is contained in:
Dean Herbert 2022-10-27 19:02:32 +09:00
parent 7916b99153
commit 3c4ba6e9fc

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
@ -45,6 +46,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("rank")]
// ScoreRank is aligned to make 0 equal D. We still want to serialise this (even when DefaultValueHandling.Ignore is used),
// so set the default to an impossible value.
[DefaultValue(null)]
public ScoreRank Rank { get; set; }
[JsonProperty("started_at")]