提交修改

This commit is contained in:
2025-10-23 23:29:10 +08:00
parent baa54a3f04
commit 1c18e4a338
18 changed files with 42 additions and 41 deletions

View File

@@ -13,32 +13,20 @@ namespace NBF
[ProtoContract]
public sealed partial class ItemConfig : ASerialize, IProto, IConfigTable
{
[ProtoMember(1)]
public uint Id { get; set; } // Id
[ProtoMember(2)]
public string Model { get; set; } // 模型
[ProtoMember(3)]
public uint Type { get; set; } // 类型
[ProtoMember(4)]
public uint Quality { get; set; } // 品质
[ProtoMember(5)]
public uint Brand { get; set; } // 品牌
[ProtoMember(6)]
public uint Weight { get; set; } // 重量(克)
[ProtoMember(7)]
public uint Length { get; set; } // 长度(毫米)
[ProtoMember(8)]
public uint Max { get; set; } // 最大堆叠数量
[ProtoMember(9)]
public uint AutoUse { get; set; } // 获得自动使用
[ProtoMember(10)]
public uint Deal { get; set; } // 交易类型
[ProtoIgnore]
public uint Key => Id;
[ProtoMember(1)] public uint Id { get; set; } // Id
[ProtoMember(2)] public string Model { get; set; } // 模型
[ProtoMember(3)] public uint Type { get; set; } // 类型
[ProtoMember(4)] public uint Quality { get; set; } // 品质
[ProtoMember(5)] public uint Brand { get; set; } // 品牌
[ProtoMember(6)] public uint Weight { get; set; } // 重量(克)
[ProtoMember(7)] public uint Length { get; set; } // 长度(毫米)
[ProtoMember(8)] public uint Max { get; set; } // 最大堆叠数量
[ProtoMember(9)] public uint AutoUse { get; set; } // 获得自动使用
[ProtoMember(10)] public uint Deal { get; set; } // 交易类型
[ProtoIgnore] public uint Key => Id;
#region Static
private static ConfigContext<ItemConfig> Context => ConfigTableHelper.Table<ItemConfig>();
public static ItemConfig Get(uint key)
@@ -50,7 +38,7 @@ namespace NBF
{
return Context.Get(match);
}
public static ItemConfig Fist()
{
return Context.Fist();
@@ -70,7 +58,7 @@ namespace NBF
{
return Context.Last(match);
}
public static int Count()
{
return Context.Count();
@@ -90,10 +78,12 @@ namespace NBF
{
return Context.GetList(match);
}
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
{
ConfigTableHelper.ParseLine<ItemConfig>(arr);
}
#endregion
}
}

View File

@@ -12,6 +12,7 @@ namespace NBF
public const string URL = "ui://hxr7rc7puq3a1h";
public GImage back;
public GImage Quality2;
public GImage Quality;
public override void ConstructFromXML(XML xml)
@@ -19,6 +20,7 @@ namespace NBF
base.ConstructFromXML(xml);
back = (GImage)GetChild("back");
Quality2 = (GImage)GetChild("Quality2");
Quality = (GImage)GetChild("Quality");
OnInited();
UILanguage.TrySetComponentLanguage(this);

View File

@@ -22,8 +22,6 @@ namespace NBF
public GComponent title;
[AutoFind(Name = "modelBack")]
public GImage modelBack;
[AutoFind(Name = "Quality2")]
public GImage Quality2;
[AutoFind(Name = "Model")]
public ModelTexture Model;
[AutoFind(Name = "Content")]