//------------------------------------------------------------------------------
//
// 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.CharacterCfg
{
public sealed partial class DataCharacterSkillLevel : Bright.Config.BeanBase
{
public DataCharacterSkillLevel(JSONNode _json)
{
{ if(!_json["RoleID"].IsNumber) { throw new SerializationException(); } RoleID = _json["RoleID"]; }
{ if(!_json["SkillLevel"].IsNumber) { throw new SerializationException(); } SkillLevel = _json["SkillLevel"]; }
{ if(!_json["SkillGroupId"].IsNumber) { throw new SerializationException(); } SkillGroupId = _json["SkillGroupId"]; }
{ var __json0 = _json["CostItems"]; if(!__json0.IsArray) { throw new SerializationException(); } CostItems = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { item.ItemCounts __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = item.ItemCounts.DeserializeItemCounts(__e0); } CostItems.Add(__v0); } }
PostInit();
}
public DataCharacterSkillLevel(int RoleID, int SkillLevel, int SkillGroupId, System.Collections.Generic.List CostItems )
{
this.RoleID = RoleID;
this.SkillLevel = SkillLevel;
this.SkillGroupId = SkillGroupId;
this.CostItems = CostItems;
PostInit();
}
public static DataCharacterSkillLevel DeserializeDataCharacterSkillLevel(JSONNode _json)
{
return new CharacterCfg.DataCharacterSkillLevel(_json);
}
///
/// 配置用ID
///
public int RoleID { get; private set; }
///
/// 技能等级
///
public int SkillLevel { get; private set; }
///
/// 技能组ID
///
public int SkillGroupId { get; private set; }
///
/// 消耗道具
///
public System.Collections.Generic.List CostItems { get; private set; }
public const int __ID__ = -1563656385;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
foreach(var _e in CostItems) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func translator)
{
foreach(var _e in CostItems) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "RoleID:" + RoleID + ","
+ "SkillLevel:" + SkillLevel + ","
+ "SkillGroupId:" + SkillGroupId + ","
+ "CostItems:" + Bright.Common.StringUtil.CollectionToString(CostItems) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}