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

added RankInfo backing field to return RankContainer Ranks or LegacyR… #123

Merged
merged 3 commits into from
Oct 15, 2020
Merged
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions DragonFruit.Six.API/Data/SeasonStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under Apache-2. Please refer to the LICENSE file for more info

using System;
using DragonFruit.Six.API.Data.Containers;
using DragonFruit.Six.API.Enums;
using Newtonsoft.Json;

Expand Down Expand Up @@ -77,5 +78,16 @@ public class SeasonStats

[JsonProperty("last_match_skill_stdev_change")]
public double LastMatchSkillUncertaintyChange { get; set; }

[JsonProperty("rank_info")]
aspriddell marked this conversation as resolved.
Show resolved Hide resolved
public RankContainer RankInfo
{
get
{
return Rank > 16 ? References.Ranks((int)Rank) : References.LegacyRanks((int)Rank);
}

set => value ??= Rank > 16 ? References.Ranks((int)Rank) : References.LegacyRanks((int)Rank);
aspriddell marked this conversation as resolved.
Show resolved Hide resolved
}
}
}