//------------------------------------------------------------------------------ // // 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 CollectingTargetInit : Bright.Config.BeanBase { public JSONNode json; public CollectingTargetInit(JSONNode _json) { { if(!_json["TaskID"].IsNumber) { throw new SerializationException(); } TaskID = _json["TaskID"]; } { 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["TokenID"].IsNumber) { throw new SerializationException(); } TokenID = _json["TokenID"]; } { if(!_json["TriggerPackID"].IsNumber) { throw new SerializationException(); } TriggerPackID = _json["TriggerPackID"]; } { if(!_json["BasicProb"].IsNumber) { throw new SerializationException(); } BasicProb = _json["BasicProb"]; } { if(!_json["DownloadPkg"].IsString) { throw new SerializationException(); } DownloadPkg = _json["DownloadPkg"]; } { if(!_json["FishingExtraDrop"].IsObject) { throw new SerializationException(); } FishingExtraDrop = EventTargetExtraDrop.DeserializeEventTargetExtraDrop(_json["FishingExtraDrop"]); } { var __json0 = _json["TargetList"]; if(!__json0.IsArray) { throw new SerializationException(); } TargetList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TargetList.Add(__v0); } } { if(!_json["BgRewardAdd"].IsString) { throw new SerializationException(); } BgRewardAdd = _json["BgRewardAdd"]; } { if(!_json["BuffIcon"].IsString) { throw new SerializationException(); } BuffIcon = _json["BuffIcon"]; } { if(!_json["BgTitle"].IsString) { throw new SerializationException(); } BgTitle = _json["BgTitle"]; } { if(!_json["BgDescPrefab"].IsString) { throw new SerializationException(); } BgDescPrefab = _json["BgDescPrefab"]; } { if(!_json["GiftIcon"].IsString) { throw new SerializationException(); } GiftIcon = _json["GiftIcon"]; } { if(!_json["GiftPrefab"].IsString) { throw new SerializationException(); } GiftPrefab = _json["GiftPrefab"]; } json = _json; PostInit(); } public CollectingTargetInit(int TaskID, string Title, int TokenID, int TriggerPackID, float BasicProb, string DownloadPkg, EventTargetExtraDrop FishingExtraDrop, System.Collections.Generic.List TargetList, string BgRewardAdd, string BuffIcon, string BgTitle, string BgDescPrefab, string GiftIcon, string GiftPrefab ) { this.TaskID = TaskID; this.Title = Title; this.TokenID = TokenID; this.TriggerPackID = TriggerPackID; this.BasicProb = BasicProb; this.DownloadPkg = DownloadPkg; this.FishingExtraDrop = FishingExtraDrop; this.TargetList = TargetList; this.BgRewardAdd = BgRewardAdd; this.BuffIcon = BuffIcon; this.BgTitle = BgTitle; this.BgDescPrefab = BgDescPrefab; this.GiftIcon = GiftIcon; this.GiftPrefab = GiftPrefab; PostInit(); } public static CollectingTargetInit DeserializeCollectingTargetInit(JSONNode _json) { return new CollectingTargetInit(_json); } public int TaskID { get; private set; } /// /// key /// public string Title { get; private set; } public string Title_l10n_key { get; } /// /// 对应Item表主键 /// public int TokenID { get; private set; } /// /// 读Pack /// public int TriggerPackID { get; private set; } /// /// 每次钓鱼时优先计算 /// public float BasicProb { get; private set; } /// /// pkgDownloads/EventTarget/下的对应名字
会加载对应文件夹内的内容 ///
public string DownloadPkg { get; private set; } /// /// 具体参数详见beans表 /// public EventTargetExtraDrop FishingExtraDrop { get; private set; } /// /// 对应Target主键 /// public System.Collections.Generic.List TargetList { get; private set; } public string BgRewardAdd { get; private set; } public string BuffIcon { get; private set; } /// /// 主界面的banner /// public string BgTitle { get; private set; } public string BgDescPrefab { get; private set; } public string GiftIcon { get; private set; } public string GiftPrefab { get; private set; } public const int __ID__ = 1983587065; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { FishingExtraDrop?.Resolve(_tables); PostResolve(); } public void TranslateText(System.Func translator) { Title = translator(Title_l10n_key, Title); FishingExtraDrop?.TranslateText(translator); } public override string ToString() { return "{ " + "TaskID:" + TaskID + "," + "Title:" + Title + "," + "TokenID:" + TokenID + "," + "TriggerPackID:" + TriggerPackID + "," + "BasicProb:" + BasicProb + "," + "DownloadPkg:" + DownloadPkg + "," + "FishingExtraDrop:" + FishingExtraDrop + "," + "TargetList:" + Bright.Common.StringUtil.CollectionToString(TargetList) + "," + "BgRewardAdd:" + BgRewardAdd + "," + "BuffIcon:" + BuffIcon + "," + "BgTitle:" + BgTitle + "," + "BgDescPrefab:" + BgDescPrefab + "," + "GiftIcon:" + GiftIcon + "," + "GiftPrefab:" + GiftPrefab + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }