Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Fix null handelling and Update KO Resource
Browse files Browse the repository at this point in the history
Soneliem committed Jun 29, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 175af53 commit 7d6b53a
Showing 4 changed files with 17 additions and 12 deletions.
8 changes: 3 additions & 5 deletions WAIUA/Helpers/LiveMatch.cs
Original file line number Diff line number Diff line change
@@ -470,7 +470,7 @@ public static async Task<MatchHistoryData> GetMatchHistoryAsync(Guid puuid)
true).ConfigureAwait(false);
if (!response.IsSuccessful)
{
Constants.Log.Error("GetCompHistoryAsync request failed: {e}", response.ErrorException);
Constants.Log.Error("GetMatchHistoryAsync request failed: {e}", response.ErrorException);
return history;
}

@@ -538,8 +538,7 @@ private static async Task<RankData> GetPlayerHistoryAsync(Guid puuid, SeasonData
int rank = 0, prank = 0, pprank = 0, ppprank = 0;
var response = await DoCachedRequestAsync(Method.Get,
$"https://pd.{Constants.Region}.a.pvp.net/mmr/v1/players/{puuid}",
true,
false).ConfigureAwait(false);
true).ConfigureAwait(false);

if (!response.IsSuccessful)
{
@@ -669,8 +668,7 @@ private static async Task<RankData> GetPlayerHistoryAsync(Guid puuid, SeasonData
{
24 => leaderboardcontent.TierDetails["22"].RankedRatingThreshold,
25 => leaderboardcontent.TierDetails["23"].RankedRatingThreshold,
26 => leaderboardcontent.TierDetails["24"].RankedRatingThreshold,
_ => 100
26 => leaderboardcontent.TierDetails["24"].RankedRatingThreshold
};
}
}
10 changes: 9 additions & 1 deletion WAIUA/Helpers/ValAPI.cs
Original file line number Diff line number Diff line change
@@ -336,7 +336,15 @@ await File.WriteAllBytesAsync(fileName, response)
}
}

await Task.WhenAll(UpdateVersion(), UpdateRanksDictionary(), UpdateAgentsDictionary(), UpdateMapsDictionary(), UpdateSkinsDictionary(), UpdateCardsDictionary(), UpdateGamemodeDictionary()).ConfigureAwait(false);
try
{
await Task.WhenAll(UpdateVersion(), UpdateRanksDictionary(), UpdateAgentsDictionary(), UpdateMapsDictionary(), UpdateSkinsDictionary(), UpdateCardsDictionary(), UpdateGamemodeDictionary()).ConfigureAwait(false);
}
catch (Exception e)
{
Constants.Log.Error("updateGamemodeDictionary Parralel Tasks Failed, Response:{error}", e);
}

}
catch (Exception e)
{
3 changes: 1 addition & 2 deletions WAIUA/Objects/RiotAPIObjects.cs
Original file line number Diff line number Diff line change
@@ -403,8 +403,7 @@ public class CompetitiveUpdatesMatch

[JsonPropertyName("MapID")] public string MapId { get; set; }

[JsonPropertyName("SeasonID")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("SeasonID"), JsonIgnore]
public Guid? SeasonId { get; set; }

[JsonPropertyName("MatchStartTime")] public long MatchStartTime { get; set; }
8 changes: 4 additions & 4 deletions WAIUA/Properties/Resources.ko.resx
Original file line number Diff line number Diff line change
@@ -232,15 +232,15 @@
<value>새로고침까지 시간:</value>
</data>
<data name="Score" xml:space="preserve">
<value>Score:</value>
<value>점수:</value>
</data>
<data name="HighScore" xml:space="preserve">
<value>High Score:</value>
<value>최고점수:</value>
</data>
<data name="StartTrainer" xml:space="preserve">
<value>Start Aim Trainer</value>
<value>에임 트레이너 시작하기</value>
</data>
<data name="Player" xml:space="preserve">
<value>Player</value>
<value>플래이어</value>
</data>
</root>

0 comments on commit 7d6b53a

Please sign in to comment.