LcuWebsocket rework
This commit is contained in:
6 files changed
+166
-56
No files matched your search
@@ -22,14 +22,14 @@ public static class ResourceService
|
||||
|
||||
public static async Task<string> GetChampionIconPathAsync(int championId = -1)
|
||||
{
|
||||
FileInfo assetFile = new(Path.Combine(AssetDirectory.FullName, CHAMPION_FILENAME_FORMAT.AsFormatWith(championId)));
|
||||
FileInfo assetFile = new(Path.Combine(AssetDirectory.FullName, CHAMPION_FILENAME_FORMAT.FormatWith(championId)));
|
||||
if (assetFile.Exists)
|
||||
{
|
||||
return assetFile.FullName;
|
||||
}
|
||||
|
||||
using HttpClient client = new();
|
||||
HttpResponseMessage response = await client.GetAsync(DDRAGON_CHAMPION_URL.AsFormatWith(championId));
|
||||
HttpResponseMessage response = await client.GetAsync(DDRAGON_CHAMPION_URL.FormatWith(championId));
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
return string.Empty;
|
||||
|
||||
Reference in new issue
Block a user