mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix 3.7 metadata crash
This commit is contained in:
@@ -20,8 +20,6 @@ internal sealed class ExceptionFormat
|
||||
/// <returns>格式化后的异常</returns>
|
||||
public static string Format(Exception exception)
|
||||
{
|
||||
// TODO: handle WinRT.ExceptionHelpers+__RestrictedErrorObject
|
||||
|
||||
StringBuilder builder = new();
|
||||
builder.AppendLine("Exception Data:");
|
||||
|
||||
@@ -29,7 +27,9 @@ internal sealed class ExceptionFormat
|
||||
{
|
||||
builder
|
||||
.Append(entry.Key)
|
||||
.Append(':')
|
||||
.Append(":[")
|
||||
.Append(TypeNameHelper.GetTypeDisplayName(entry.Value))
|
||||
.Append("]:")
|
||||
.Append(entry.Value)
|
||||
.Append(StringLiterals.CRLF);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ internal static class TypeNameHelper
|
||||
public static string GetTypeDisplayName(Type type, bool fullName = true, bool includeGenericParameterNames = false, bool includeGenericParameters = true, char nestedTypeDelimiter = DefaultNestedTypeDelimiter)
|
||||
{
|
||||
StringBuilder? builder = null;
|
||||
string? name = ProcessType(ref builder, type, new DisplayNameOptions(fullName, includeGenericParameterNames, includeGenericParameters, nestedTypeDelimiter));
|
||||
string? name = ProcessType(ref builder, type, new(fullName, includeGenericParameterNames, includeGenericParameters, nestedTypeDelimiter));
|
||||
return name ?? builder?.ToString() ?? string.Empty;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ internal enum GrowCurveType
|
||||
GROW_CURVE_HP_S4 = 22,
|
||||
GROW_CURVE_HP_2 = 23,
|
||||
GROW_CURVE_ATTACK_2 = 24,
|
||||
GROW_CURVE_HP_ENVIRONMENT = 25,
|
||||
GROW_CURVE_ATTACK_S5 = 31,
|
||||
GROW_CURVE_ATTACK_S4 = 32,
|
||||
GROW_CURVE_ATTACK_S3 = 33,
|
||||
|
||||
@@ -38,6 +38,7 @@ internal sealed class AvatarNameCardPicConverter : ValueConverter<Avatar.Avatar?
|
||||
return avatarName switch
|
||||
{
|
||||
"Yae" => "Yae1",
|
||||
"Momoka" => "Kirara",
|
||||
_ => avatarName,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user