//------------------------------------------------------------------------------ // // 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 PvpEventCycleItem : Bright.Config.BeanBase { public JSONNode json; public PvpEventCycleItem(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; } { if(!_json["SubType"].IsNumber) { throw new SerializationException(); } SubType = _json["SubType"]; } { if(!_json["EventName"]["key"].IsString) { throw new SerializationException(); } EventName_l10n_key = _json["EventName"]["key"]; if(!_json["EventName"]["text"].IsString) { throw new SerializationException(); } EventName = _json["EventName"]["text"]; } { if(!_json["ItemId"].IsNumber) { throw new SerializationException(); } ItemId = _json["ItemId"]; } { if(!_json["ExchangeRate"].IsNumber) { throw new SerializationException(); } ExchangeRate = _json["ExchangeRate"]; } { if(!_json["WelcomeGift"].IsNumber) { throw new SerializationException(); } WelcomeGift = _json["WelcomeGift"]; } { if(!_json["RedDot"].IsNumber) { throw new SerializationException(); } RedDot = _json["RedDot"]; } { var __json0 = _json["EventEndSettlement"]; if(!__json0.IsArray) { throw new SerializationException(); } EventEndSettlement = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } EventEndSettlement.Add(__v0); } } json = _json; PostInit(); } public PvpEventCycleItem(int ID, int Type, int SubType, string EventName, int ItemId, int ExchangeRate, int WelcomeGift, int RedDot, System.Collections.Generic.List EventEndSettlement ) { this.ID = ID; this.Type = Type; this.SubType = SubType; this.EventName = EventName; this.ItemId = ItemId; this.ExchangeRate = ExchangeRate; this.WelcomeGift = WelcomeGift; this.RedDot = RedDot; this.EventEndSettlement = EventEndSettlement; PostInit(); } public static PvpEventCycleItem DeserializePvpEventCycleItem(JSONNode _json) { return new PvpEventCycleItem(_json); } /// /// #备注行 /// public int ID { get; private set; } /// /// 见附录 /// public int Type { get; private set; } /// /// 见附录 /// public int SubType { get; private set; } /// /// 活动名 /// public string EventName { get; private set; } public string EventName_l10n_key { get; } public int ItemId { get; private set; } /// /// 1、几个通用代币,能换一个对应活动代币,取整时四舍五入
2、缺省配置,代表X个代币能换1000钞票 ///
public int ExchangeRate { get; private set; } public int WelcomeGift { get; private set; } /// /// 剩余道具≥设定值时,有红点 /// public int RedDot { get; private set; } /// /// 转换成的itemID /// public System.Collections.Generic.List EventEndSettlement { get; private set; } public const int __ID__ = 511479113; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { EventName = translator(EventName_l10n_key, EventName); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Type:" + Type + "," + "SubType:" + SubType + "," + "EventName:" + EventName + "," + "ItemId:" + ItemId + "," + "ExchangeRate:" + ExchangeRate + "," + "WelcomeGift:" + WelcomeGift + "," + "RedDot:" + RedDot + "," + "EventEndSettlement:" + Bright.Common.StringUtil.CollectionToString(EventEndSettlement) + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }