//------------------------------------------------------------------------------ // // 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 Luban; namespace SepCore.Definition { public sealed partial class BattleActionConfig : Luban.BeanBase { public BattleActionConfig(ByteBuf _buf) { Id = _buf.ReadInt(); Name = _buf.ReadString(); ActionType = (BattleActionType)_buf.ReadInt(); TargetType = (BattleTargetType)_buf.ReadInt(); MpCost = _buf.ReadInt(); {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Effects = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { BattleEffect _e0; _e0 = BattleEffect.DeserializeBattleEffect(_buf); Effects.Add(_e0);}} } public static BattleActionConfig DeserializeBattleActionConfig(ByteBuf _buf) { return new BattleActionConfig(_buf); } /// /// 行动ID /// public readonly int Id; /// /// 显示名 /// public readonly string Name; /// /// 行动类型 /// public readonly BattleActionType ActionType; /// /// 目标选择方式 /// public readonly BattleTargetType TargetType; /// /// MP消耗 /// public readonly int MpCost; /// /// 简单数值效果列表 /// public readonly System.Collections.Generic.List Effects; public const int __ID__ = -690357744; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { foreach (var _e in Effects) { _e?.ResolveRef(tables); } } public override string ToString() { return "{ " + "id:" + Id + "," + "name:" + Name + "," + "actionType:" + ActionType + "," + "targetType:" + TargetType + "," + "mpCost:" + MpCost + "," + "effects:" + Luban.StringUtil.CollectionToString(Effects) + "," + "}"; } } }