//------------------------------------------------------------------------------ // // 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 Bright.Serialization; using System.Collections.Generic; using SimpleJSON; namespace cfg { public sealed partial class ItemStore : Bright.Config.BeanBase { public JSONNode json; public ItemStore(JSONNode _json) { { if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = _json["Id"]; } { if(!_json["CellId"].IsNumber) { throw new SerializationException(); } CellId = _json["CellId"]; } { if(!_json["Weight"].IsNumber) { throw new SerializationException(); } Weight = _json["Weight"]; } { if(!_json["ItemType"].IsNumber) { throw new SerializationException(); } ItemType = _json["ItemType"]; } { if(!_json["ItemId"].IsNumber) { throw new SerializationException(); } ItemId = _json["ItemId"]; } { if(!_json["ItemNumber"].IsNumber) { throw new SerializationException(); } ItemNumber = _json["ItemNumber"]; } { if(!_json["TokenId"].IsNumber) { throw new SerializationException(); } TokenId = _json["TokenId"]; } { if(!_json["TokenNumber"].IsNumber) { throw new SerializationException(); } TokenNumber = _json["TokenNumber"]; } { var __json0 = _json["Discount"]; if(!__json0.IsArray) { throw new SerializationException(); } Discount = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Discount.Add(__v0); } } { var __json0 = _json["DiscountWeight"]; if(!__json0.IsArray) { throw new SerializationException(); } DiscountWeight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DiscountWeight.Add(__v0); } } json = _json; PostInit(); } public ItemStore(int Id, int CellId, int Weight, int ItemType, int ItemId, int ItemNumber, int TokenId, int TokenNumber, System.Collections.Generic.List Discount, System.Collections.Generic.List DiscountWeight ) { this.Id = Id; this.CellId = CellId; this.Weight = Weight; this.ItemType = ItemType; this.ItemId = ItemId; this.ItemNumber = ItemNumber; this.TokenId = TokenId; this.TokenNumber = TokenNumber; this.Discount = Discount; this.DiscountWeight = DiscountWeight; PostInit(); } public static ItemStore DeserializeItemStore(JSONNode _json) { return new ItemStore(_json); } /// /// 主键 /// public int Id { get; private set; } public int CellId { get; private set; } public int Weight { get; private set; } /// /// 0=普通道具;
1=宝箱(深入一层)
9=鱼卡 ///
public int ItemType { get; private set; } /// /// 若ItemType=9,此列为品质,0绿1蓝2紫3橙4彩 /// public int ItemId { get; private set; } /// /// 道具数量 /// public int ItemNumber { get; private set; } /// /// 代币Id /// public int TokenId { get; private set; } public int TokenNumber { get; private set; } /// /// 配置为空代表无折扣 /// public System.Collections.Generic.List Discount { get; private set; } public System.Collections.Generic.List DiscountWeight { get; private set; } public const int __ID__ = -148266642; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { } public override string ToString() { return "{ " + "Id:" + Id + "," + "CellId:" + CellId + "," + "Weight:" + Weight + "," + "ItemType:" + ItemType + "," + "ItemId:" + ItemId + "," + "ItemNumber:" + ItemNumber + "," + "TokenId:" + TokenId + "," + "TokenNumber:" + TokenNumber + "," + "Discount:" + Bright.Common.StringUtil.CollectionToString(Discount) + "," + "DiscountWeight:" + Bright.Common.StringUtil.CollectionToString(DiscountWeight) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }