Update CharacterData.cs

This commit is contained in:
Kei-Luna
2026-04-22 08:17:06 +09:00
parent 1c2a43fa61
commit 872cc7b074

View File

@@ -21,6 +21,8 @@ public class CharacterInfo
public int Trust { get; set; } public int Trust { get; set; }
public uint WeaponUniqueId { get; set; } public uint WeaponUniqueId { get; set; }
public uint SkinId { get; set; } public uint SkinId { get; set; }
public uint Flag { get; set; }
public uint Expiration { get; set; }
[SugarColumn(IsJson = true)] public List<uint> UnlockedSkin { get; set; } = []; [SugarColumn(IsJson = true)] public List<uint> UnlockedSkin { get; set; } = [];
[SugarColumn(IsJson = true)] public List<uint> Spines { get; set; } = []; [SugarColumn(IsJson = true)] public List<uint> Spines { get; set; } = [];
[SugarColumn(IsJson = true)] public List<uint> Affixs { get; set; } = []; [SugarColumn(IsJson = true)] public List<uint> Affixs { get; set; } = [];
@@ -34,12 +36,19 @@ public class CharacterInfo
Id = Guid, Id = Guid,
Template = TemplateId, Template = TemplateId,
Count = Count, Count = Count,
Flag = Flag,
Expiration = Expiration,
Enhance = new Enhance Enhance = new Enhance
{ {
Level = Level, Level = Level,
Break = Break Exp = ToUInt32(Exp),
Break = Break,
Evolue = ToUInt32(Evolue),
Trust = ToUInt32(Trust)
} }
}; };
proto.Enhance.Spines.AddRange(Spines.Select(x => (ulong)x));
proto.Enhance.Affixs.AddRange(Affixs);
proto.Slots[4] = WeaponUniqueId; proto.Slots[4] = WeaponUniqueId;
proto.Slots[5] = SkinId; proto.Slots[5] = SkinId;
@@ -47,4 +56,9 @@ public class CharacterInfo
return proto; return proto;
} }
private static uint ToUInt32(int value)
{
return value > 0 ? (uint)value : 0;
}
} }