//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using Luban; using Newtonsoft.Json.Linq; namespace cfg { public sealed partial class Item : Luban.BeanBase { public Item(JToken _buf) { JObject _obj = _buf as JObject; Id = (int)_obj.GetValue("id"); Type = (int)_obj.GetValue("type"); Quality = (int)_obj.GetValue("quality"); Brand = (int)_obj.GetValue("brand"); Weight = (int)_obj.GetValue("weight"); Length = (int)_obj.GetValue("length"); Max = (int)_obj.GetValue("max"); AutoUse = (int)_obj.GetValue("auto_use"); Effect = (int)_obj.GetValue("effect"); { var __json0 = _obj.GetValue("result1"); Result1 = new System.Collections.Generic.List((__json0 as JArray).Count); foreach(JToken __e0 in __json0) { int __v0; __v0 = (int)__e0; Result1.Add(__v0); } } { var __json0 = _obj.GetValue("result2"); Result2 = new System.Collections.Generic.List((__json0 as JArray).Count); foreach(JToken __e0 in __json0) { string __v0; __v0 = (string)__e0; Result2.Add(__v0); } } } public static Item DeserializeItem(JToken _buf) { return new Item(_buf); } /// /// Id /// public readonly int Id; /// /// 子类型 /// public readonly int Type; /// /// 品质 /// public readonly int Quality; /// /// 品牌 /// public readonly int Brand; /// /// 重量(克) /// public readonly int Weight; /// /// 长度(毫米) /// public readonly int Length; /// /// 最大堆叠数量 /// public readonly int Max; /// /// 获得自动使用 /// public readonly int AutoUse; /// /// 使用效果 /// public readonly int Effect; /// /// 使用参数1 /// public readonly System.Collections.Generic.List Result1; /// /// 使用参数2 /// public readonly System.Collections.Generic.List Result2; public const int __ID__ = 2289459; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "type:" + Type + "," + "quality:" + Quality + "," + "brand:" + Brand + "," + "weight:" + Weight + "," + "length:" + Length + "," + "max:" + Max + "," + "autoUse:" + AutoUse + "," + "effect:" + Effect + "," + "result1:" + Luban.StringUtil.CollectionToString(Result1) + "," + "result2:" + Luban.StringUtil.CollectionToString(Result2) + "," + "}"; } } }