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

87 lines
3.1 KiB
C#
Raw Normal View History

2023-08-22 19:08:45 +08:00
//------------------------------------------------------------------------------
// <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)
{
2023-10-19 15:00:19 +08:00
{ if(!_json["RoleID"].IsNumber) { throw new SerializationException(); } RoleID = _json["RoleID"]; }
2023-08-22 19:08:45 +08:00
{ if(!_json["SkillLevel"].IsNumber) { throw new SerializationException(); } SkillLevel = _json["SkillLevel"]; }
2023-10-19 15:00:19 +08:00
{ 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); } }
2023-08-22 19:08:45 +08:00
PostInit();
}
2023-10-19 15:00:19 +08:00
public DataCharacterSkillLevel(int RoleID, int SkillLevel, int SkillGroupId, System.Collections.Generic.List<item.ItemCounts> CostItems )
2023-08-22 19:08:45 +08:00
{
this.RoleID = RoleID;
this.SkillLevel = SkillLevel;
2023-10-19 15:00:19 +08:00
this.SkillGroupId = SkillGroupId;
this.CostItems = CostItems;
2023-08-22 19:08:45 +08:00
PostInit();
}
public static DataCharacterSkillLevel DeserializeDataCharacterSkillLevel(JSONNode _json)
{
return new CharacterCfg.DataCharacterSkillLevel(_json);
}
/// <summary>
2023-10-19 15:00:19 +08:00
/// 配置用ID
2023-08-22 19:08:45 +08:00
/// </summary>
2023-10-19 15:00:19 +08:00
public int RoleID { get; private set; }
2023-08-22 19:08:45 +08:00
/// <summary>
/// 技能等级
/// </summary>
public int SkillLevel { get; private set; }
/// <summary>
2023-10-19 15:00:19 +08:00
/// 技能组ID
2023-08-22 19:08:45 +08:00
/// </summary>
2023-10-19 15:00:19 +08:00
public int SkillGroupId { get; private set; }
2023-08-22 19:08:45 +08:00
/// <summary>
2023-10-19 15:00:19 +08:00
/// 消耗道具
2023-08-22 19:08:45 +08:00
/// </summary>
2023-10-19 15:00:19 +08:00
public System.Collections.Generic.List<item.ItemCounts> CostItems { get; private set; }
2023-08-22 19:08:45 +08:00
public const int __ID__ = -1563656385;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
2023-10-19 15:00:19 +08:00
foreach(var _e in CostItems) { _e?.Resolve(_tables); }
2023-08-22 19:08:45 +08:00
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
2023-10-19 15:00:19 +08:00
foreach(var _e in CostItems) { _e?.TranslateText(translator); }
2023-08-22 19:08:45 +08:00
}
public override string ToString()
{
return "{ "
+ "RoleID:" + RoleID + ","
+ "SkillLevel:" + SkillLevel + ","
2023-10-19 15:00:19 +08:00
+ "SkillGroupId:" + SkillGroupId + ","
+ "CostItems:" + Bright.Common.StringUtil.CollectionToString(CostItems) + ","
2023-08-22 19:08:45 +08:00
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}