From 42c915d6d6d5c81f430c62918e52d0d20e98ecb5 Mon Sep 17 00:00:00 2001 From: Soneliem Date: Sat, 14 Aug 2021 19:24:07 +0930 Subject: [PATCH] -cleanup - rank 0 if no current rank --- WAIUA.sln | 4 ---- WAIUA/Commands/APIConnection.cs | 13 ++++++++----- WAIUA/Commands/LiveMatch.cs | 6 ------ WAIUA/WAIUA.csproj | 1 - 4 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 WAIUA/Commands/LiveMatch.cs diff --git a/WAIUA.sln b/WAIUA.sln index 82368b8..f510931 100644 --- a/WAIUA.sln +++ b/WAIUA.sln @@ -6,10 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WAIUA", "WAIUA\WAIUA.csproj", "{AF25112C-91B9-4735-AE9B-C7CE963A30A4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{13E3F6B6-D516-4741-9317-407D36E7B34F}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - WAIUA\Views\Account.xaml.cs = WAIUA\Views\Account.xaml.cs - EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/WAIUA/Commands/APIConnection.cs b/WAIUA/Commands/APIConnection.cs index bfe75a4..d1a344a 100644 --- a/WAIUA/Commands/APIConnection.cs +++ b/WAIUA/Commands/APIConnection.cs @@ -43,9 +43,6 @@ public static class APIConnection public static string[] PGList { get; set; } = new string[10]; public static string[] PPGList { get; set; } = new string[10]; public static string[] PPPGList { get; set; } = new string[10]; - //public static string processName { get; set; }; - //public static string processId { get; set; }; - public static void Login(CookieContainer cookie, string username, string password) { try @@ -192,7 +189,6 @@ public static void LocalLogin() public static void LocalRegion() { - GetLatestVersion(); RestClient client = new RestClient(new Uri($"https://127.0.0.1:{Port}/product-session/v1/external-sessions")); RestRequest request = new RestRequest(Method.GET); client.RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true; @@ -461,7 +457,14 @@ public static void GetPlayerHistory(string puuid, int playerno) string content = client.Execute(request).Content; dynamic contentobj = JObject.Parse(content); - rank = contentobj.QueueSkills.competitive.SeasonalInfoBySeasonID[$"{CurrentSeason}"].CompetitiveTier; + try + { + rank = contentobj.QueueSkills.competitive.SeasonalInfoBySeasonID[$"{CurrentSeason}"].CompetitiveTier; + } + catch (Exception) + { + rank = "0"; + } RankList[playerno] = GetLRankIcon(rank); try { diff --git a/WAIUA/Commands/LiveMatch.cs b/WAIUA/Commands/LiveMatch.cs deleted file mode 100644 index 515809f..0000000 --- a/WAIUA/Commands/LiveMatch.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace WAIUA.Commands -{ - public class LiveMatch - { - } -} \ No newline at end of file diff --git a/WAIUA/WAIUA.csproj b/WAIUA/WAIUA.csproj index a139cd6..c7540a5 100644 --- a/WAIUA/WAIUA.csproj +++ b/WAIUA/WAIUA.csproj @@ -41,7 +41,6 @@ -