mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
GameProto
GameProto
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 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<int>(__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<Battle.SkillAttrDamageData>(__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<int> BuffID, System.Collections.Generic.List<Battle.SkillAttrDamageData> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 技能ID
|
||||
/// </summary>
|
||||
public int Id { get; private set; }
|
||||
/// <summary>
|
||||
/// 名字
|
||||
/// </summary>
|
||||
public string Name { get; private set; }
|
||||
/// <summary>
|
||||
/// 表现ID
|
||||
/// </summary>
|
||||
public int SkillDispID { get; private set; }
|
||||
/// <summary>
|
||||
/// 技能类型SkillType
|
||||
/// </summary>
|
||||
public int SkillType { get; private set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Desc { get; private set; }
|
||||
/// <summary>
|
||||
/// 消耗MP
|
||||
/// </summary>
|
||||
public int CostMP { get; private set; }
|
||||
/// <summary>
|
||||
/// 所属公CD组ID
|
||||
/// </summary>
|
||||
public int GCDID { get; private set; }
|
||||
/// <summary>
|
||||
/// 技能CD
|
||||
/// </summary>
|
||||
public float SkillCD { get; private set; }
|
||||
/// <summary>
|
||||
/// 是否重复触发
|
||||
/// </summary>
|
||||
public bool IsRepeatTrigger { get; private set; }
|
||||
/// <summary>
|
||||
/// BuffIDList
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<int> BuffID { get; private set; }
|
||||
public System.Collections.Generic.List<Battle.SkillAttrDamageData> AttrDamageData { get; private set; }
|
||||
|
||||
public const int __ID__ = 2067672430;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
foreach(var _e in AttrDamageData) { _e?.Resolve(_tables); }
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> 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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user