LcuWebsocket rework

This commit is contained in:
SacredFloof committed 2026-11-15 12:27:36 +01:00
1 parent 383f05dfdc
commit 07ac3f5cfd
6 files changed
+166 -56

No files matched your search

+2 -2
View File
@@ -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;