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 uint WeaponUniqueId { 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> Spines { get; set; } = [];
[SugarColumn(IsJson = true)] public List<uint> Affixs { get; set; } = [];
@@ -34,12 +36,19 @@ public class CharacterInfo
Id = Guid,
Template = TemplateId,
Count = Count,
Flag = Flag,
Expiration = Expiration,
Enhance = new Enhance
{
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[5] = SkinId;
@@ -47,4 +56,9 @@ public class CharacterInfo
return proto;
}
private static uint ToUInt32(int value)
{
return value > 0 ? (uint)value : 0;
}
}