//------------------------------------------------------------------------------ // // 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 Account : Bright.Config.BeanBase { public JSONNode json; public Account(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Rewards"].IsNumber) { throw new SerializationException(); } Rewards = _json["Rewards"]; } { if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; } { if(!_json["Img"].IsString) { throw new SerializationException(); } Img = _json["Img"]; } { 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"]; } { var __json0 = _json["DisplaySwitch"]; if(!__json0.IsArray) { throw new SerializationException(); } DisplaySwitch = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DisplaySwitch.Add(__v0); } } { if(!_json["CashMag"].IsNumber) { throw new SerializationException(); } CashMag = _json["CashMag"]; } { if(!_json["CashMagLimited"].IsNumber) { throw new SerializationException(); } CashMagLimited = _json["CashMagLimited"]; } { if(!_json["EnergyLimit"].IsNumber) { throw new SerializationException(); } EnergyLimit = _json["EnergyLimit"]; } { if(!_json["EnergyRecover"].IsNumber) { throw new SerializationException(); } EnergyRecover = _json["EnergyRecover"]; } { if(!_json["EventFishCashMag"].IsNumber) { throw new SerializationException(); } EventFishCashMag = _json["EventFishCashMag"]; } { if(!_json["EventFishDamage"].IsNumber) { throw new SerializationException(); } EventFishDamage = _json["EventFishDamage"]; } { if(!_json["AquariumLimit"].IsNumber) { throw new SerializationException(); } AquariumLimit = _json["AquariumLimit"]; } { if(!_json["AquariumCashMag"].IsNumber) { throw new SerializationException(); } AquariumCashMag = _json["AquariumCashMag"]; } json = _json; PostInit(); } public Account(int ID, int Rewards, string Icon, string Img, string Title, System.Collections.Generic.List DisplaySwitch, int CashMag, int CashMagLimited, int EnergyLimit, int EnergyRecover, int EventFishCashMag, int EventFishDamage, int AquariumLimit, int AquariumCashMag ) { this.ID = ID; this.Rewards = Rewards; this.Icon = Icon; this.Img = Img; this.Title = Title; this.DisplaySwitch = DisplaySwitch; this.CashMag = CashMag; this.CashMagLimited = CashMagLimited; this.EnergyLimit = EnergyLimit; this.EnergyRecover = EnergyRecover; this.EventFishCashMag = EventFishCashMag; this.EventFishDamage = EventFishDamage; this.AquariumLimit = AquariumLimit; this.AquariumCashMag = AquariumCashMag; PostInit(); } public static Account DeserializeAccount(JSONNode _json) { return new Account(_json); } public int ID { get; private set; } /// /// 对应Drop表主键 /// public int Rewards { get; private set; } /// /// 图标名称
Type=1的时候生效 ///
public string Icon { get; private set; } /// /// 大图 /// public string Img { get; private set; } public string Title { get; private set; } public string Title_l10n_key { get; } /// /// 若本级有权益投放,对应权益显示为1 /// public System.Collections.Generic.List DisplaySwitch { get; private set; } /// /// 填等级,具体数值读benefits /// public int CashMag { get; private set; } public int CashMagLimited { get; private set; } public int EnergyLimit { get; private set; } public int EnergyRecover { get; private set; } public int EventFishCashMag { get; private set; } public int EventFishDamage { get; private set; } public int AquariumLimit { get; private set; } public int AquariumCashMag { get; private set; } public const int __ID__ = 487334413; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Title = translator(Title_l10n_key, Title); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Rewards:" + Rewards + "," + "Icon:" + Icon + "," + "Img:" + Img + "," + "Title:" + Title + "," + "DisplaySwitch:" + Bright.Common.StringUtil.CollectionToString(DisplaySwitch) + "," + "CashMag:" + CashMag + "," + "CashMagLimited:" + CashMagLimited + "," + "EnergyLimit:" + EnergyLimit + "," + "EnergyRecover:" + EnergyRecover + "," + "EventFishCashMag:" + EventFishCashMag + "," + "EventFishDamage:" + EventFishDamage + "," + "AquariumLimit:" + AquariumLimit + "," + "AquariumCashMag:" + AquariumCashMag + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }