//------------------------------------------------------------------------------
//
// 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.SkillCfg
{
public sealed partial class DataSkill : Bright.Config.BeanBase
{
public DataSkill(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["NameRead"].IsString) { throw new SerializationException(); } NameRead = _json["NameRead"]; }
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["SkillType"].IsNumber) { throw new SerializationException(); } SkillType = (SkillCfg.ESkillType)_json["SkillType"].AsInt; }
{ if(!_json["SkillDesc"].IsString) { throw new SerializationException(); } SkillDesc = _json["SkillDesc"]; }
{ if(!_json["SkillActionId"].IsNumber) { throw new SerializationException(); } SkillActionId = _json["SkillActionId"]; }
{ if(!_json["TargetType"].IsNumber) { throw new SerializationException(); } TargetType = (SkillCfg.ETargetType)_json["TargetType"].AsInt; }
{ if(!_json["ReleaseArea"].IsNumber) { throw new SerializationException(); } ReleaseArea = _json["ReleaseArea"]; }
{ if(!_json["InfluenceAreaId"].IsNumber) { throw new SerializationException(); } InfluenceAreaId = _json["InfluenceAreaId"]; }
{ if(!_json["SelectCount"].IsNumber) { throw new SerializationException(); } SelectCount = _json["SelectCount"]; }
{ if(!_json["ShowAreaId"].IsNumber) { throw new SerializationException(); } ShowAreaId = _json["ShowAreaId"]; }
{ if(!_json["ShowEffectId"].IsNumber) { throw new SerializationException(); } ShowEffectId = _json["ShowEffectId"]; }
{ var __json0 = _json["IntParams"]; if(!__json0.IsArray) { throw new SerializationException(); } IntParams = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } IntParams.Add(__v0); } }
{ var __json0 = _json["FloatParams"]; if(!__json0.IsArray) { throw new SerializationException(); } FloatParams = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } FloatParams.Add(__v0); } }
{ if(!_json["CDTime"].IsNumber) { throw new SerializationException(); } CDTime = _json["CDTime"]; }
{ if(!_json["LogicId"].IsNumber) { throw new SerializationException(); } LogicId = _json["LogicId"]; }
{ if(!_json["IconPath"].IsString) { throw new SerializationException(); } IconPath = _json["IconPath"]; }
PostInit();
}
public DataSkill(int ID, string NameRead, string Name, SkillCfg.ESkillType SkillType, string SkillDesc, int SkillActionId, SkillCfg.ETargetType TargetType, int ReleaseArea, int InfluenceAreaId, int SelectCount, int ShowAreaId, int ShowEffectId, System.Collections.Generic.List IntParams, System.Collections.Generic.List FloatParams, float CDTime, int LogicId, string IconPath )
{
this.ID = ID;
this.NameRead = NameRead;
this.Name = Name;
this.SkillType = SkillType;
this.SkillDesc = SkillDesc;
this.SkillActionId = SkillActionId;
this.TargetType = TargetType;
this.ReleaseArea = ReleaseArea;
this.InfluenceAreaId = InfluenceAreaId;
this.SelectCount = SelectCount;
this.ShowAreaId = ShowAreaId;
this.ShowEffectId = ShowEffectId;
this.IntParams = IntParams;
this.FloatParams = FloatParams;
this.CDTime = CDTime;
this.LogicId = LogicId;
this.IconPath = IconPath;
PostInit();
}
public static DataSkill DeserializeDataSkill(JSONNode _json)
{
return new SkillCfg.DataSkill(_json);
}
///
/// 配置用ID
///
public int ID { get; private set; }
///
/// 名字
///
public string NameRead { get; private set; }
///
/// 显示名字
///
public string Name { get; private set; }
///
/// 技能类型
///
public SkillCfg.ESkillType SkillType { get; private set; }
///
/// 技能描述
///
public string SkillDesc { get; private set; }
///
/// 技能action类型
///
public int SkillActionId { get; private set; }
///
/// 目标类型
///
public SkillCfg.ETargetType TargetType { get; private set; }
///
/// 释放范围
///
public int ReleaseArea { get; private set; }
///
/// 技能生效范围id
///
public int InfluenceAreaId { get; private set; }
///
/// 从区域中选择多少个对象(随机)
-1代表全选
///
public int SelectCount { get; private set; }
///
/// 显示的区域id
///
public int ShowAreaId { get; private set; }
///
/// 显示的特效id
///
public int ShowEffectId { get; private set; }
///
/// 技能辅助数值int
///
public System.Collections.Generic.List IntParams { get; private set; }
///
/// 技能辅助数值float
///
public System.Collections.Generic.List FloatParams { get; private set; }
///
/// 技能cd
///
public float CDTime { get; private set; }
///
/// 技能逻辑id
///
public int LogicId { get; private set; }
///
/// 技能图标路径
///
public string IconPath { get; private set; }
public const int __ID__ = -727246612;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "NameRead:" + NameRead + ","
+ "Name:" + Name + ","
+ "SkillType:" + SkillType + ","
+ "SkillDesc:" + SkillDesc + ","
+ "SkillActionId:" + SkillActionId + ","
+ "TargetType:" + TargetType + ","
+ "ReleaseArea:" + ReleaseArea + ","
+ "InfluenceAreaId:" + InfluenceAreaId + ","
+ "SelectCount:" + SelectCount + ","
+ "ShowAreaId:" + ShowAreaId + ","
+ "ShowEffectId:" + ShowEffectId + ","
+ "IntParams:" + Bright.Common.StringUtil.CollectionToString(IntParams) + ","
+ "FloatParams:" + Bright.Common.StringUtil.CollectionToString(FloatParams) + ","
+ "CDTime:" + CDTime + ","
+ "LogicId:" + LogicId + ","
+ "IconPath:" + IconPath + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}