Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

changed method GetUInt to GetInt, changed Rank type from uint to int … #125

Merged
merged 3 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static SeasonStats DeserializeSeasonStatsFor(this JObject jObject, string
Abandons = json.GetUInt(Seasonal.Abandons),
WL = json.GetFloat(Seasonal.Wins, 1) / MathUtils.Clamp(json.GetFloat(Seasonal.Losses) + json.GetFloat(Seasonal.Abandons), 1, float.MaxValue),

Rank = json.GetUInt(Seasonal.Rank),
Rank = json.GetInt(Seasonal.Rank),
MaxRank = json.GetUInt(Seasonal.MaxRank),
TopRankPosition = json.GetUInt(Seasonal.TopRankPosition),

Expand Down
4 changes: 2 additions & 2 deletions DragonFruit.Six.API/Data/SeasonStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class SeasonStats
public uint MaxRank { get; set; }

[JsonProperty("rank")]
public uint Rank { get; set; }
public int Rank { get; set; }

[JsonProperty("top_rank_position")]
public uint TopRankPosition { get; set; }
Expand Down Expand Up @@ -81,6 +81,6 @@ public class SeasonStats
[JsonProperty("last_match_skill_stdev_change")]
public double LastMatchSkillUncertaintyChange { get; set; }

public RankContainer RankInfo => _rankInfo ??= Rank > 14 ? References.Ranks((int)Rank) : References.LegacyRanks((int)Rank);
public RankContainer RankInfo => _rankInfo ??= Rank > 14 ? References.Ranks(Rank) : References.LegacyRanks(Rank);
}
}