//------------------------------------------------------------------------------ // // 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 ItemDropPackage : Bright.Config.BeanBase { public JSONNode json; public ItemDropPackage(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { var __json0 = _json["DropList"]; if(!__json0.IsArray) { throw new SerializationException(); } DropList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DropList.Add(__v0); } } { if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; } { if(!_json["Desc"]["key"].IsString) { throw new SerializationException(); } Desc_l10n_key = _json["Desc"]["key"]; if(!_json["Desc"]["text"].IsString) { throw new SerializationException(); } Desc = _json["Desc"]["text"]; } { var __json0 = _json["ItemDisplay"]; if(!__json0.IsArray) { throw new SerializationException(); } ItemDisplay = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ItemDisplay.Add(__v0); } } { var __json0 = _json["CountDisplay"]; if(!__json0.IsArray) { throw new SerializationException(); } CountDisplay = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } CountDisplay.Add(__v0); } } { var __json0 = _json["ProbDisplay"]; if(!__json0.IsArray) { throw new SerializationException(); } ProbDisplay = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ProbDisplay.Add(__v0); } } json = _json; PostInit(); } public ItemDropPackage(int ID, System.Collections.Generic.List DropList, string Icon, string Desc, System.Collections.Generic.List ItemDisplay, System.Collections.Generic.List CountDisplay, System.Collections.Generic.List ProbDisplay ) { this.ID = ID; this.DropList = DropList; this.Icon = Icon; this.Desc = Desc; this.ItemDisplay = ItemDisplay; this.CountDisplay = CountDisplay; this.ProbDisplay = ProbDisplay; PostInit(); } public static ItemDropPackage DeserializeItemDropPackage(JSONNode _json) { return new ItemDropPackage(_json); } /// /// 对应道具表中,宝箱类型道具的RedirectID /// public int ID { get; private set; } /// /// 对应投放表主键 /// public System.Collections.Generic.List DropList { get; private set; } public string Icon { get; private set; } /// /// key /// public string Desc { get; private set; } public string Desc_l10n_key { get; } /// /// 对应Item表主键 /// public System.Collections.Generic.List ItemDisplay { get; private set; } /// /// 数量浮动的用-隔开,比如30-50
如果不显示,则留空 ///
public System.Collections.Generic.List CountDisplay { get; private set; } /// /// 需要显示为百分数 /// public System.Collections.Generic.List ProbDisplay { get; private set; } public const int __ID__ = -1658385116; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Desc = translator(Desc_l10n_key, Desc); } public override string ToString() { return "{ " + "ID:" + ID + "," + "DropList:" + Bright.Common.StringUtil.CollectionToString(DropList) + "," + "Icon:" + Icon + "," + "Desc:" + Desc + "," + "ItemDisplay:" + Bright.Common.StringUtil.CollectionToString(ItemDisplay) + "," + "CountDisplay:" + Bright.Common.StringUtil.CollectionToString(CountDisplay) + "," + "ProbDisplay:" + Bright.Common.StringUtil.CollectionToString(ProbDisplay) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }