mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix #406
This commit is contained in:
@@ -22,12 +22,14 @@ public class UIAF
|
||||
/// <summary>
|
||||
/// 信息
|
||||
/// </summary>
|
||||
[JsonPropertyName("info")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public UIAFInfo Info { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
[JsonPropertyName("list")]
|
||||
public List<UIAFItem> List { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -13,21 +13,25 @@ public class UIAFItem
|
||||
/// <summary>
|
||||
/// 成就Id
|
||||
/// </summary>
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完成时间
|
||||
/// </summary>
|
||||
[JsonPropertyName("timestamp")]
|
||||
public long Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// 对于progress为1的项,该属性始终为0
|
||||
/// </summary>
|
||||
[JsonPropertyName("current")]
|
||||
public int Current { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完成状态
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public AchievementInfoStatus Status { get; set; }
|
||||
}
|
||||
@@ -25,12 +25,6 @@ internal class GachaLogUrlWebCacheProvider : IGachaLogUrlProvider
|
||||
this.gameService = gameService;
|
||||
}
|
||||
|
||||
private enum UrlMatch
|
||||
{
|
||||
Chinese,
|
||||
Oversea,
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string Name { get => nameof(GachaLogUrlWebCacheProvider); }
|
||||
|
||||
@@ -41,11 +35,12 @@ internal class GachaLogUrlWebCacheProvider : IGachaLogUrlProvider
|
||||
/// <returns>缓存文件路径</returns>
|
||||
public static string GetCacheFile(string path)
|
||||
{
|
||||
string folder = Path.GetDirectoryName(path) ?? string.Empty;
|
||||
string cacheDataPathChinese = Path.Combine(folder, @"YuanShen_Data\webCaches\Cache\Cache_Data\data_2");
|
||||
string cacheDataPathOversea = Path.Combine(folder, @"GenshinImpact_Data\webCaches\Cache\Cache_Data\data_2");
|
||||
string exeName = Path.GetFileName(path);
|
||||
string dataFolder = exeName == GameConstants.GenshinImpactFileName
|
||||
? GameConstants.GenshinImpactData
|
||||
: GameConstants.YuanShenData;
|
||||
|
||||
return File.Exists(cacheDataPathChinese) ? cacheDataPathChinese : cacheDataPathOversea;
|
||||
return Path.Combine(Path.GetDirectoryName(path)!, dataFolder, @"webCaches\Cache\Cache_Data\data_2");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -98,4 +93,4 @@ internal class GachaLogUrlWebCacheProvider : IGachaLogUrlProvider
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user