From f5bdef9b37f314ef5229c8b3f77eaf8d5868bc7b Mon Sep 17 00:00:00 2001 From: DeinFreund Date: Thu, 22 Nov 2018 15:47:25 +0100 Subject: [PATCH] always put the logged in player at the end of ladders if ranked --- Zero-K.info/Views/Ladders/ladders.cshtml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Zero-K.info/Views/Ladders/ladders.cshtml b/Zero-K.info/Views/Ladders/ladders.cshtml index 6444b73ae2..233df59381 100644 --- a/Zero-K.info/Views/Ladders/ladders.cshtml +++ b/Zero-K.info/Views/Ladders/ladders.cshtml @@ -24,8 +24,14 @@ { @:
} + var acc = acct; + if (rank == GlobalConst.LadderSize && Global.IsAccountAuthorized && Global.Account.GetRating(RatingCategory.MatchMaking)?.Rank > rank) + { + rank = Global.Account.GetRating(RatingCategory.MatchMaking).Rank; + acc = Global.Account; + } - @(rank) ) @Html.PrintAccount(acct) - @(Math.Round(acct.GetRating(RatingCategory.MatchMaking).Elo))
+ @(rank) ) @Html.PrintAccount(acc) - @(Math.Round(acc.GetRating(RatingCategory.MatchMaking).Elo))
} } @@ -41,6 +47,12 @@ { @:

} + var acc = acct; + if (rank == GlobalConst.LadderSize && Global.IsAccountAuthorized && Global.Account.GetRating(RatingCategory.Casual)?.Rank > rank) + { + rank = Global.Account.GetRating(RatingCategory.Casual).Rank; + acc = Global.Account; + } @(rank)) @Html.PrintAccount(acct) - @(Math.Round(acct.GetRating(RatingCategory.Casual).Elo))