//------------------------------------------------------------------------------
//
// 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 GameConfig.Battle
{
public sealed partial class SkillBaseConfig : Bright.Config.BeanBase
{
public SkillBaseConfig(JSONNode _json)
{
{ if(!_json["id"].IsNumber) { throw new SerializationException(); } Id = _json["id"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["SkillDispID"].IsNumber) { throw new SerializationException(); } SkillDispID = _json["SkillDispID"]; }
{ if(!_json["SkillType"].IsNumber) { throw new SerializationException(); } SkillType = _json["SkillType"]; }
{ if(!_json["desc"].IsString) { throw new SerializationException(); } Desc = _json["desc"]; }
{ if(!_json["CostMP"].IsNumber) { throw new SerializationException(); } CostMP = _json["CostMP"]; }
{ if(!_json["GCDID"].IsNumber) { throw new SerializationException(); } GCDID = _json["GCDID"]; }
{ if(!_json["SkillCD"].IsNumber) { throw new SerializationException(); } SkillCD = _json["SkillCD"]; }
{ if(!_json["IsRepeatTrigger"].IsBoolean) { throw new SerializationException(); } IsRepeatTrigger = _json["IsRepeatTrigger"]; }
{ var __json0 = _json["BuffID"]; if(!__json0.IsArray) { throw new SerializationException(); } BuffID = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } BuffID.Add(__v0); } }
{ var __json0 = _json["AttrDamageData"]; if(!__json0.IsArray) { throw new SerializationException(); } AttrDamageData = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Battle.SkillAttrDamageData __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(__e0); } AttrDamageData.Add(__v0); } }
PostInit();
}
public SkillBaseConfig(int id, string name, int SkillDispID, int SkillType, string desc, int CostMP, int GCDID, float SkillCD, bool IsRepeatTrigger, System.Collections.Generic.List BuffID, System.Collections.Generic.List AttrDamageData )
{
this.Id = id;
this.Name = name;
this.SkillDispID = SkillDispID;
this.SkillType = SkillType;
this.Desc = desc;
this.CostMP = CostMP;
this.GCDID = GCDID;
this.SkillCD = SkillCD;
this.IsRepeatTrigger = IsRepeatTrigger;
this.BuffID = BuffID;
this.AttrDamageData = AttrDamageData;
PostInit();
}
public static SkillBaseConfig DeserializeSkillBaseConfig(JSONNode _json)
{
return new Battle.SkillBaseConfig(_json);
}
///
/// 技能ID
///
public int Id { get; private set; }
///
/// 名字
///
public string Name { get; private set; }
///
/// 表现ID
///
public int SkillDispID { get; private set; }
///
/// 技能类型SkillType
///
public int SkillType { get; private set; }
///
/// 描述
///
public string Desc { get; private set; }
///
/// 消耗MP
///
public int CostMP { get; private set; }
///
/// 所属公CD组ID
///
public int GCDID { get; private set; }
///
/// 技能CD
///
public float SkillCD { get; private set; }
///
/// 是否重复触发
///
public bool IsRepeatTrigger { get; private set; }
///
/// BuffIDList
///
public System.Collections.Generic.List BuffID { get; private set; }
public System.Collections.Generic.List AttrDamageData { get; private set; }
public const int __ID__ = 2067672430;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
foreach(var _e in AttrDamageData) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func translator)
{
foreach(var _e in AttrDamageData) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Name:" + Name + ","
+ "SkillDispID:" + SkillDispID + ","
+ "SkillType:" + SkillType + ","
+ "Desc:" + Desc + ","
+ "CostMP:" + CostMP + ","
+ "GCDID:" + GCDID + ","
+ "SkillCD:" + SkillCD + ","
+ "IsRepeatTrigger:" + IsRepeatTrigger + ","
+ "BuffID:" + Bright.Common.StringUtil.CollectionToString(BuffID) + ","
+ "AttrDamageData:" + Bright.Common.StringUtil.CollectionToString(AttrDamageData) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}