diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 8379e69869..c305cc004a 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -26,9 +26,9 @@ namespace osu.Game.Users [JsonProperty(@"age")] public int? Age; - public int GlobalRank; + public int GlobalRank { get => Statistics.Ranks.GlobalRank; set => Statistics.Ranks.GlobalRank = value; } - public int CountryRank; + public int CountryRank { get => Statistics.Ranks.CountryRank; set => Statistics.Ranks.CountryRank = value; } //public Team Team; diff --git a/osu.Game/Users/UserStatistics.cs b/osu.Game/Users/UserStatistics.cs index 73d20eafb9..f047bd1980 100644 --- a/osu.Game/Users/UserStatistics.cs +++ b/osu.Game/Users/UserStatistics.cs @@ -23,7 +23,19 @@ namespace osu.Game.Users public decimal? PP; [JsonProperty(@"pp_rank")] - public int Rank; + public int Rank { get => Ranks.GlobalRank; set => Ranks.GlobalRank = value; } + + [JsonProperty(@"rank")] + public UserRank Ranks; + + public struct UserRank + { + [JsonProperty(@"global")] + public int GlobalRank; + + [JsonProperty(@"country")] + public int CountryRank; + } [JsonProperty(@"ranked_score")] public long RankedScore;