//------------------------------------------------------------------------------ // // 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 SpecialPack : Bright.Config.BeanBase { public JSONNode json; public SpecialPack(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Title"]["key"].IsString) { throw new SerializationException(); } Title_l10n_key = _json["Title"]["key"]; if(!_json["Title"]["text"].IsString) { throw new SerializationException(); } Title = _json["Title"]["text"]; } { 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["DropID"]; if(!__json0.IsArray) { throw new SerializationException(); } DropID = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DropID.Add(__v0); } } { var __json0 = _json["IAP_ID"]; if(!__json0.IsArray) { throw new SerializationException(); } IAPID = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } IAPID.Add(__v0); } } { if(!_json["ActivateItemId"].IsNumber) { throw new SerializationException(); } ActivateItemId = _json["ActivateItemId"]; } { if(!_json["ActiveItemImg"].IsString) { throw new SerializationException(); } ActiveItemImg = _json["ActiveItemImg"]; } { if(!_json["EventItemId"].IsNumber) { throw new SerializationException(); } EventItemId = _json["EventItemId"]; } { var __json0 = _json["EventItemRequire"]; if(!__json0.IsArray) { throw new SerializationException(); } EventItemRequire = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } EventItemRequire.Add(__v0); } } { var __json0 = _json["DiscountList"]; if(!__json0.IsArray) { throw new SerializationException(); } DiscountList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DiscountList.Add(__v0); } } { if(!_json["EventItemCountFirst"].IsNumber) { throw new SerializationException(); } EventItemCountFirst = _json["EventItemCountFirst"]; } { if(!_json["CanBuyCount"].IsNumber) { throw new SerializationException(); } CanBuyCount = _json["CanBuyCount"]; } { var __json0 = _json["EventItemGet"]; if(!__json0.IsArray) { throw new SerializationException(); } EventItemGet = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } EventItemGet.Add(__v0); } } json = _json; PostInit(); } public SpecialPack(int ID, string Title, string Desc, System.Collections.Generic.List DropID, System.Collections.Generic.List IAP_ID, int ActivateItemId, string ActiveItemImg, int EventItemId, System.Collections.Generic.List EventItemRequire, System.Collections.Generic.List DiscountList, int EventItemCountFirst, int CanBuyCount, System.Collections.Generic.List EventItemGet ) { this.ID = ID; this.Title = Title; this.Desc = Desc; this.DropID = DropID; this.IAPID = IAP_ID; this.ActivateItemId = ActivateItemId; this.ActiveItemImg = ActiveItemImg; this.EventItemId = EventItemId; this.EventItemRequire = EventItemRequire; this.DiscountList = DiscountList; this.EventItemCountFirst = EventItemCountFirst; this.CanBuyCount = CanBuyCount; this.EventItemGet = EventItemGet; PostInit(); } public static SpecialPack DeserializeSpecialPack(JSONNode _json) { return new SpecialPack(_json); } public int ID { get; private set; } public string Title { get; private set; } public string Title_l10n_key { get; } public string Desc { get; private set; } public string Desc_l10n_key { get; } /// /// 投放内容 /// public System.Collections.Generic.List DropID { get; private set; } public System.Collections.Generic.List IAPID { get; private set; } /// /// 读Item表 /// public int ActivateItemId { get; private set; } public string ActiveItemImg { get; private set; } /// /// 读Item表 /// public int EventItemId { get; private set; } /// /// 砍价、储蓄罐、自选鱼竿礼包专用 /// public System.Collections.Generic.List EventItemRequire { get; private set; } /// /// 砍价礼包专用 /// public System.Collections.Generic.List DiscountList { get; private set; } /// /// 触发礼包时,给多少活动道具 /// public int EventItemCountFirst { get; private set; } /// /// 储蓄罐专用,达到多少值可以进行购买 /// public int CanBuyCount { get; private set; } /// /// 小型鱼(品质1) /// public System.Collections.Generic.List EventItemGet { get; private set; } public const int __ID__ = 795327058; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Title = translator(Title_l10n_key, Title); Desc = translator(Desc_l10n_key, Desc); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Title:" + Title + "," + "Desc:" + Desc + "," + "DropID:" + Bright.Common.StringUtil.CollectionToString(DropID) + "," + "IAPID:" + Bright.Common.StringUtil.CollectionToString(IAPID) + "," + "ActivateItemId:" + ActivateItemId + "," + "ActiveItemImg:" + ActiveItemImg + "," + "EventItemId:" + EventItemId + "," + "EventItemRequire:" + Bright.Common.StringUtil.CollectionToString(EventItemRequire) + "," + "DiscountList:" + Bright.Common.StringUtil.CollectionToString(DiscountList) + "," + "EventItemCountFirst:" + EventItemCountFirst + "," + "CanBuyCount:" + CanBuyCount + "," + "EventItemGet:" + Bright.Common.StringUtil.CollectionToString(EventItemGet) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }