add weapon parts

This commit is contained in:
Naruse
2026-04-30 17:18:23 +08:00
parent 49f4fdfda5
commit 2883ac3d41
12 changed files with 182 additions and 7 deletions

View File

@@ -62,6 +62,7 @@ public abstract class GrowableItemInfo : BaseGameItemInfo
public class GameWeaponInfo : GrowableItemInfo
{
[SugarColumn(IsJson = true)] public Dictionary<uint, ulong> PartSlots { get; set; } = [];
public override Item ToProto()
{
var proto = new Item
@@ -78,6 +79,7 @@ public class GameWeaponInfo : GrowableItemInfo
Evolue = Evolue
}
};
foreach (var (slot, uid) in PartSlots) proto.Slots[slot] = uid;
return proto;
}
}