//------------------------------------------------------------------------------
//
// 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 EventDrillTunnel : Bright.Config.BeanBase
{
public JSONNode json;
public EventDrillTunnel(JSONNode _json)
{
{ if(!_json["Tunnel"].IsNumber) { throw new SerializationException(); } Tunnel = _json["Tunnel"]; }
{ if(!_json["ItemRequired"].IsNumber) { throw new SerializationException(); } ItemRequired = _json["ItemRequired"]; }
{ if(!_json["Resource"].IsString) { throw new SerializationException(); } Resource = _json["Resource"]; }
{ if(!_json["TaskList"].IsNumber) { throw new SerializationException(); } TaskList = _json["TaskList"]; }
{ if(!_json["DropGem"].IsNumber) { throw new SerializationException(); } DropGem = _json["DropGem"]; }
{ var __json0 = _json["DropCountList"]; if(!__json0.IsArray) { throw new SerializationException(); } DropCountList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DropCountList.Add(__v0); } }
{ var __json0 = _json["DropWeightList"]; if(!__json0.IsArray) { throw new SerializationException(); } DropWeightList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } DropWeightList.Add(__v0); } }
{ if(!_json["DropItemId"].IsNumber) { throw new SerializationException(); } DropItemId = _json["DropItemId"]; }
{ var __json0 = _json["FixDropId"]; if(!__json0.IsArray) { throw new SerializationException(); } FixDropId = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FixDropId.Add(__v0); } }
json = _json;
PostInit();
}
public EventDrillTunnel(int Tunnel, int ItemRequired, string Resource, int TaskList, int DropGem, System.Collections.Generic.List DropCountList, System.Collections.Generic.List DropWeightList, int DropItemId, System.Collections.Generic.List FixDropId )
{
this.Tunnel = Tunnel;
this.ItemRequired = ItemRequired;
this.Resource = Resource;
this.TaskList = TaskList;
this.DropGem = DropGem;
this.DropCountList = DropCountList;
this.DropWeightList = DropWeightList;
this.DropItemId = DropItemId;
this.FixDropId = FixDropId;
PostInit();
}
public static EventDrillTunnel DeserializeEventDrillTunnel(JSONNode _json)
{
return new EventDrillTunnel(_json);
}
public int Tunnel { get; private set; }
public int ItemRequired { get; private set; }
public string Resource { get; private set; }
///
/// 读EventDrillReward
///
public int TaskList { get; private set; }
///
/// 读Drop表
///
public int DropGem { get; private set; }
///
/// 掉落几份奖励
///
public System.Collections.Generic.List DropCountList { get; private set; }
///
/// 奖励份数权重
///
public System.Collections.Generic.List DropWeightList { get; private set; }
///
/// 具体奖励id
///
public int DropItemId { get; private set; }
///
/// 前X次固定掉落
///
public System.Collections.Generic.List FixDropId { get; private set; }
public const int __ID__ = 744544713;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "Tunnel:" + Tunnel + ","
+ "ItemRequired:" + ItemRequired + ","
+ "Resource:" + Resource + ","
+ "TaskList:" + TaskList + ","
+ "DropGem:" + DropGem + ","
+ "DropCountList:" + Bright.Common.StringUtil.CollectionToString(DropCountList) + ","
+ "DropWeightList:" + Bright.Common.StringUtil.CollectionToString(DropWeightList) + ","
+ "DropItemId:" + DropItemId + ","
+ "FixDropId:" + Bright.Common.StringUtil.CollectionToString(FixDropId) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}