mirror of
https://github.com/wangdage12/Snap.Hutao.git
synced 2026-02-17 15:06:39 +08:00
解决元数据导致的问题
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<Package
|
<Package
|
||||||
Name="Snap.Hutao"
|
Name="Snap.Hutao"
|
||||||
Manufacturer="Millennium Science Technology R-D Inst"
|
Manufacturer="Millennium Science Technology R-D Inst"
|
||||||
Version="1.0.0.0"
|
Version="1.17.4.0"
|
||||||
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
|
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
|
||||||
Scope="perMachine">
|
Scope="perMachine">
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<HarvestDirectory Include="..\Snap.Hutao\bin\Release\net10.0-windows10.0.26100.0\win-x64">
|
<HarvestDirectory Include="..\Snap.Hutao\bin\x64\Release\net10.0-windows10.0.26100.0\win-x64">
|
||||||
<ComponentGroupName>MainAppComponents</ComponentGroupName>
|
<ComponentGroupName>MainAppComponents</ComponentGroupName>
|
||||||
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
||||||
<SuppressCom>true</SuppressCom>
|
<SuppressCom>true</SuppressCom>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="60568DGPStudio.SnapHutao"
|
Name="60568DGPStudio.SnapHutao"
|
||||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||||
Version="1.17.1.0" />
|
Version="1.17.4.0" />
|
||||||
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Snap Hutao</DisplayName>
|
<DisplayName>Snap Hutao</DisplayName>
|
||||||
|
|||||||
@@ -24,14 +24,23 @@ internal static class AvatarViewBuilderExtension
|
|||||||
{
|
{
|
||||||
if (detailedCharacter.Costumes is [{ Id: { } id }, ..])
|
if (detailedCharacter.Costumes is [{ Id: { } id }, ..])
|
||||||
{
|
{
|
||||||
MetadataCostume costume = avatar.Costumes.Single(c => c.Id == id);
|
MetadataCostume? costume = avatar.Costumes.SingleOrDefault(c => c.Id == id);
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(costume.FrontIcon);
|
if (costume != null)
|
||||||
ArgumentNullException.ThrowIfNull(costume.SideIcon);
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(costume.FrontIcon);
|
||||||
|
ArgumentNullException.ThrowIfNull(costume.SideIcon);
|
||||||
|
|
||||||
// Set to costume icon
|
// Set to costume icon
|
||||||
builder.View.Icon = AvatarIconConverter.IconNameToUri(costume.FrontIcon);
|
builder.View.Icon = AvatarIconConverter.IconNameToUri(costume.FrontIcon);
|
||||||
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(costume.SideIcon);
|
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(costume.SideIcon);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Costume not found in metadata, fallback to default avatar icon
|
||||||
|
builder.View.Icon = AvatarIconConverter.IconNameToUri(avatar.Icon);
|
||||||
|
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(avatar.SideIcon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<UseWinUI>true</UseWinUI>
|
<UseWinUI>true</UseWinUI>
|
||||||
<UseWPF>False</UseWPF>
|
<UseWPF>False</UseWPF>
|
||||||
|
<!-- 配置版本号 -->
|
||||||
|
<Version>1.17.4.0</Version>
|
||||||
|
|
||||||
<UseWindowsForms>False</UseWindowsForms>
|
<UseWindowsForms>False</UseWindowsForms>
|
||||||
<ImplicitUsings>False</ImplicitUsings>
|
<ImplicitUsings>False</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@@ -288,7 +291,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Snap.Hutao.SourceGeneration" Version="1.3.14">
|
<PackageReference Include="Snap.Hutao.SourceGeneration" Version="1.3.15">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
// Copyright (c) DGP Studio. All rights reserved.
|
|
||||||
// Licensed under the MIT license.
|
|
||||||
|
|
||||||
namespace Snap.Hutao.Web.Hoyolab.DataSigning;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Salt constants for data signing
|
|
||||||
/// Values are obtained from https://github.com/UIGF-org/Hoyolab.Salt
|
|
||||||
/// This file should normally be generated by Snap.Hutao.SourceGeneration.Automation.SaltConstantGenerator
|
|
||||||
/// But is provided manually when the generator fails to fetch values from the network.
|
|
||||||
///
|
|
||||||
/// IMPORTANT: For local builds, you must manually obtain salt values from:
|
|
||||||
/// https://github.com/UIGF-org/Hoyolab.Salt
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
internal static class SaltConstants
|
|
||||||
{
|
|
||||||
// Version numbers - Update these according to the current miHoYo app versions
|
|
||||||
public const string CNVersion = "2.95.1";
|
|
||||||
public const string OSVersion = "2.54.0";
|
|
||||||
|
|
||||||
// Salt keys for Chinese (CN) server
|
|
||||||
// These are placeholder values - MUST be replaced with actual values from UIGF-org/Hoyolab.Salt
|
|
||||||
public const string CNK2 = "sfYPEgpxkOe1I3XVMLdwp1Lyt9ORgZsq";
|
|
||||||
public const string CNLK2 = "sidQFEglajEz7FA0Aj7HQPV88zpf17SO";
|
|
||||||
|
|
||||||
// Salt keys for Overseas (OS) server
|
|
||||||
public const string OSK2 = "599uqkwc0dlqu3h6epzjzfhgyyrd44ae";
|
|
||||||
public const string OSLK2 = "rk4xg2hakoi26nljpr099fv9fck1ah10";
|
|
||||||
|
|
||||||
// Note: The actual salt values are security-sensitive and should not be committed
|
|
||||||
// to public repositories. For local builds, obtain them from the UIGF organization
|
|
||||||
// and replace the placeholders above.
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user