//------------------------------------------------------------------------------
//
// 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 EventLuckMagic : Bright.Config.BeanBase
{
public JSONNode json;
public EventLuckMagic(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["Prefab"].IsString) { throw new SerializationException(); } Prefab = _json["Prefab"]; }
{ if(!_json["TaskPrefab"].IsString) { throw new SerializationException(); } TaskPrefab = _json["TaskPrefab"]; }
{ if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; }
{ if(!_json["Item"].IsNumber) { throw new SerializationException(); } Item = _json["Item"]; }
{ if(!_json["BuyCount"].IsNumber) { throw new SerializationException(); } BuyCount = _json["BuyCount"]; }
{ if(!_json["Price"].IsNumber) { throw new SerializationException(); } Price = _json["Price"]; }
{ if(!_json["PackId"].IsNumber) { throw new SerializationException(); } PackId = _json["PackId"]; }
{ if(!_json["TargetRewardItem1"].IsNumber) { throw new SerializationException(); } TargetRewardItem1 = _json["TargetRewardItem1"]; }
{ var __json0 = _json["TargetRewardDrop1"]; if(!__json0.IsArray) { throw new SerializationException(); } TargetRewardDrop1 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TargetRewardDrop1.Add(__v0); } }
{ if(!_json["TargetRewardItem2"].IsNumber) { throw new SerializationException(); } TargetRewardItem2 = _json["TargetRewardItem2"]; }
{ var __json0 = _json["TargetRewardDrop2"]; if(!__json0.IsArray) { throw new SerializationException(); } TargetRewardDrop2 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TargetRewardDrop2.Add(__v0); } }
{ var __json0 = _json["TaskRound1"]; if(!__json0.IsArray) { throw new SerializationException(); } TaskRound1 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TaskRound1.Add(__v0); } }
{ var __json0 = _json["TaskRound2"]; if(!__json0.IsArray) { throw new SerializationException(); } TaskRound2 = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TaskRound2.Add(__v0); } }
json = _json;
PostInit();
}
public EventLuckMagic(int ID, string Title, string Prefab, string TaskPrefab, string Icon, int Item, int BuyCount, int Price, int PackId, int TargetRewardItem1, System.Collections.Generic.List TargetRewardDrop1, int TargetRewardItem2, System.Collections.Generic.List TargetRewardDrop2, System.Collections.Generic.List TaskRound1, System.Collections.Generic.List TaskRound2 )
{
this.ID = ID;
this.Title = Title;
this.Prefab = Prefab;
this.TaskPrefab = TaskPrefab;
this.Icon = Icon;
this.Item = Item;
this.BuyCount = BuyCount;
this.Price = Price;
this.PackId = PackId;
this.TargetRewardItem1 = TargetRewardItem1;
this.TargetRewardDrop1 = TargetRewardDrop1;
this.TargetRewardItem2 = TargetRewardItem2;
this.TargetRewardDrop2 = TargetRewardDrop2;
this.TaskRound1 = TaskRound1;
this.TaskRound2 = TaskRound2;
PostInit();
}
public static EventLuckMagic DeserializeEventLuckMagic(JSONNode _json)
{
return new EventLuckMagic(_json);
}
public int ID { get; private set; }
///
/// key
///
public string Title { get; private set; }
public string Title_l10n_key { get; }
public string Prefab { get; private set; }
public string TaskPrefab { get; private set; }
public string Icon { get; private set; }
public int Item { get; private set; }
public int BuyCount { get; private set; }
public int Price { get; private set; }
///
/// 读shop表
///
public int PackId { get; private set; }
public int TargetRewardItem1 { get; private set; }
public System.Collections.Generic.List TargetRewardDrop1 { get; private set; }
public int TargetRewardItem2 { get; private set; }
public System.Collections.Generic.List TargetRewardDrop2 { get; private set; }
public System.Collections.Generic.List TaskRound1 { get; private set; }
public System.Collections.Generic.List TaskRound2 { get; private set; }
public const int __ID__ = 873679650;
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 + ","
+ "Title:" + Title + ","
+ "Prefab:" + Prefab + ","
+ "TaskPrefab:" + TaskPrefab + ","
+ "Icon:" + Icon + ","
+ "Item:" + Item + ","
+ "BuyCount:" + BuyCount + ","
+ "Price:" + Price + ","
+ "PackId:" + PackId + ","
+ "TargetRewardItem1:" + TargetRewardItem1 + ","
+ "TargetRewardDrop1:" + Bright.Common.StringUtil.CollectionToString(TargetRewardDrop1) + ","
+ "TargetRewardItem2:" + TargetRewardItem2 + ","
+ "TargetRewardDrop2:" + Bright.Common.StringUtil.CollectionToString(TargetRewardDrop2) + ","
+ "TaskRound1:" + Bright.Common.StringUtil.CollectionToString(TaskRound1) + ","
+ "TaskRound2:" + Bright.Common.StringUtil.CollectionToString(TaskRound2) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}