File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace osu . NET . Models . Scores ;
4+
5+ /// <summary>
6+ /// Represents the weighting of a score in a users' overall performance.
7+ /// <br/><br/>
8+ /// API docs: <a href="https://osu.ppy.sh/docs/index.html#score"/><br/>
9+ /// Source: <a href="https://github.com/ppy/osu-web/blob/master/resources/js/interfaces/score-json.ts"/>
10+ /// </summary>
11+ public class PPWeight
12+ {
13+ /// <summary>
14+ /// The amount of weighted PP the score contributes.
15+ /// </summary>
16+ [ JsonProperty ( "pp" ) ]
17+ public float PP { get ; private set ; }
18+
19+ /// <summary>
20+ /// The weight percentage.
21+ /// </summary>
22+ [ JsonProperty ( "percentage" ) ]
23+ public float Percentage { get ; private set ; }
24+ }
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ public class Score
231231 /// The weight of this score in the player's overall performance. This is an optional property and may be null.
232232 /// </summary>
233233 [ JsonProperty ( "weight" ) ]
234- public double Weight { get ; private set ; }
234+ public PPWeight ? Weight { get ; private set ; }
235235
236236 #endregion
237237}
You can’t perform that action at this time.
0 commit comments