NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/DataTable/CharacterCfg/DataCharacterSkillLevel.cs

87 lines
3.1 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
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<item.ItemCounts>(__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<item.ItemCounts> 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);
}
/// <summary>
/// 配置用ID
/// </summary>
public int RoleID { get; private set; }
/// <summary>
/// 技能等级
/// </summary>
public int SkillLevel { get; private set; }
/// <summary>
/// 技能组ID
/// </summary>
public int SkillGroupId { get; private set; }
/// <summary>
/// 消耗道具
/// </summary>
public System.Collections.Generic.List<item.ItemCounts> CostItems { get; private set; }
public const int __ID__ = -1563656385;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var _e in CostItems) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func<string, string, string> 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();
}
}