更新编辑器MenuItem导表与导出协议

更新编辑器MenuItem导表与导出协议
This commit is contained in:
ALEXTANGXIAO
2023-07-29 00:03:54 +08:00
parent 30192d52cf
commit 98dcb80942
29 changed files with 217 additions and 1018 deletions

View File

@@ -7,46 +7,29 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class BuffAttrConfig : Bright.Config.BeanBase
{
public BuffAttrConfig(JSONNode _json)
public BuffAttrConfig(ByteBuf _buf)
{
{ if(!_json["BuffID"].IsNumber) { throw new SerializationException(); } BuffID = _json["BuffID"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["StackNum"].IsNumber) { throw new SerializationException(); } StackNum = _json["StackNum"]; }
{ if(!_json["DurTime"].IsNumber) { throw new SerializationException(); } DurTime = _json["DurTime"]; }
{ if(!_json["ResultType"].IsNumber) { throw new SerializationException(); } ResultType = (Battle.BuffResultType)_json["ResultType"].AsInt; }
{ if(!_json["RemoveWhenDie"].IsNumber) { throw new SerializationException(); } RemoveWhenDie = _json["RemoveWhenDie"]; }
{ if(!_json["DotDamageData"].IsObject) { throw new SerializationException(); } DotDamageData = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(_json["DotDamageData"]); }
{ if(!_json["DotTickConfig"].IsObject) { throw new SerializationException(); } DotTickConfig = Battle.BuffDotTickConfig.DeserializeBuffDotTickConfig(_json["DotTickConfig"]); }
{ var __json0 = _json["AttrData"]; if(!__json0.IsArray) { throw new SerializationException(); } AttrData = new System.Collections.Generic.List<Battle.ResAttrImpactData>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Battle.ResAttrImpactData __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Battle.ResAttrImpactData.DeserializeResAttrImpactData(__e0); } AttrData.Add(__v0); } }
BuffID = _buf.ReadInt();
Name = _buf.ReadString();
StackNum = _buf.ReadInt();
DurTime = _buf.ReadFloat();
ResultType = (Battle.BuffResultType)_buf.ReadInt();
RemoveWhenDie = _buf.ReadInt();
DotDamageData = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(_buf);
DotTickConfig = Battle.BuffDotTickConfig.DeserializeBuffDotTickConfig(_buf);
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AttrData = new System.Collections.Generic.List<Battle.ResAttrImpactData>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { Battle.ResAttrImpactData _e0; _e0 = Battle.ResAttrImpactData.DeserializeResAttrImpactData(_buf); AttrData.Add(_e0);}}
PostInit();
}
public BuffAttrConfig(int BuffID, string name, int StackNum, float DurTime, Battle.BuffResultType ResultType, int RemoveWhenDie, Battle.SkillAttrDamageData DotDamageData, Battle.BuffDotTickConfig DotTickConfig, System.Collections.Generic.List<Battle.ResAttrImpactData> AttrData )
public static BuffAttrConfig DeserializeBuffAttrConfig(ByteBuf _buf)
{
this.BuffID = BuffID;
this.Name = name;
this.StackNum = StackNum;
this.DurTime = DurTime;
this.ResultType = ResultType;
this.RemoveWhenDie = RemoveWhenDie;
this.DotDamageData = DotDamageData;
this.DotTickConfig = DotTickConfig;
this.AttrData = AttrData;
PostInit();
}
public static BuffAttrConfig DeserializeBuffAttrConfig(JSONNode _json)
{
return new Battle.BuffAttrConfig(_json);
return new Battle.BuffAttrConfig(_buf);
}
/// <summary>
@@ -113,4 +96,5 @@ public sealed partial class BuffAttrConfig : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,44 +7,28 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class BuffConfig : Bright.Config.BeanBase
{
public BuffConfig(JSONNode _json)
public BuffConfig(ByteBuf _buf)
{
{ if(!_json["BuffID"].IsNumber) { throw new SerializationException(); } BuffID = _json["BuffID"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["prefId"].IsNumber) { throw new SerializationException(); } PrefId = _json["prefId"]; }
{ if(!_json["desc"].IsString) { throw new SerializationException(); } Desc = _json["desc"]; }
{ if(!_json["icon"].IsString) { throw new SerializationException(); } Icon = _json["icon"]; }
{ if(!_json["TimeType"].IsNumber) { throw new SerializationException(); } TimeType = (Battle.BuffTimeType)_json["TimeType"].AsInt; }
{ if(!_json["ReplaceType"].IsNumber) { throw new SerializationException(); } ReplaceType = (Battle.BuffReplaceType)_json["ReplaceType"].AsInt; }
{ if(!_json["State"].IsObject) { throw new SerializationException(); } State = Battle.BuffTriggleState.DeserializeBuffTriggleState(_json["State"]); }
BuffID = _buf.ReadInt();
Name = _buf.ReadString();
PrefId = _buf.ReadInt();
Desc = _buf.ReadString();
Icon = _buf.ReadString();
TimeType = (Battle.BuffTimeType)_buf.ReadInt();
ReplaceType = (Battle.BuffReplaceType)_buf.ReadInt();
State = Battle.BuffTriggleState.DeserializeBuffTriggleState(_buf);
PostInit();
}
public BuffConfig(int BuffID, string name, int prefId, string desc, string icon, Battle.BuffTimeType TimeType, Battle.BuffReplaceType ReplaceType, Battle.BuffTriggleState State )
public static BuffConfig DeserializeBuffConfig(ByteBuf _buf)
{
this.BuffID = BuffID;
this.Name = name;
this.PrefId = prefId;
this.Desc = desc;
this.Icon = icon;
this.TimeType = TimeType;
this.ReplaceType = ReplaceType;
this.State = State;
PostInit();
}
public static BuffConfig DeserializeBuffConfig(JSONNode _json)
{
return new Battle.BuffConfig(_json);
return new Battle.BuffConfig(_buf);
}
/// <summary>
@@ -108,4 +92,5 @@ public sealed partial class BuffConfig : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,32 +7,22 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class BuffDotTickConfig : Bright.Config.BeanBase
{
public BuffDotTickConfig(JSONNode _json)
public BuffDotTickConfig(ByteBuf _buf)
{
{ if(!_json["TickTime"].IsNumber) { throw new SerializationException(); } TickTime = _json["TickTime"]; }
{ if(!_json["TickWhenAdd"].IsNumber) { throw new SerializationException(); } TickWhenAdd = _json["TickWhenAdd"]; }
TickTime = _buf.ReadFloat();
TickWhenAdd = _buf.ReadInt();
PostInit();
}
public BuffDotTickConfig(float TickTime, int TickWhenAdd )
public static BuffDotTickConfig DeserializeBuffDotTickConfig(ByteBuf _buf)
{
this.TickTime = TickTime;
this.TickWhenAdd = TickWhenAdd;
PostInit();
}
public static BuffDotTickConfig DeserializeBuffDotTickConfig(JSONNode _json)
{
return new Battle.BuffDotTickConfig(_json);
return new Battle.BuffDotTickConfig(_buf);
}
public float TickTime { get; private set; }
@@ -61,4 +51,5 @@ public sealed partial class BuffDotTickConfig : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,32 +7,22 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class BuffTriggleState : Bright.Config.BeanBase
{
public BuffTriggleState(JSONNode _json)
public BuffTriggleState(ByteBuf _buf)
{
{ if(!_json["StateID"].IsNumber) { throw new SerializationException(); } StateID = (Battle.BuffStateID)_json["StateID"].AsInt; }
{ if(!_json["StateParam"].IsNumber) { throw new SerializationException(); } StateParam = _json["StateParam"]; }
StateID = (Battle.BuffStateID)_buf.ReadInt();
StateParam = _buf.ReadFloat();
PostInit();
}
public BuffTriggleState(Battle.BuffStateID StateID, float StateParam )
public static BuffTriggleState DeserializeBuffTriggleState(ByteBuf _buf)
{
this.StateID = StateID;
this.StateParam = StateParam;
PostInit();
}
public static BuffTriggleState DeserializeBuffTriggleState(JSONNode _json)
{
return new Battle.BuffTriggleState(_json);
return new Battle.BuffTriggleState(_buf);
}
public Battle.BuffStateID StateID { get; private set; }
@@ -61,4 +51,5 @@ public sealed partial class BuffTriggleState : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,34 +7,23 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class ResAttrImpactData : Bright.Config.BeanBase
{
public ResAttrImpactData(JSONNode _json)
public ResAttrImpactData(ByteBuf _buf)
{
{ if(!_json["DataType"].IsNumber) { throw new SerializationException(); } DataType = (Battle.ActorAttrDataType)_json["DataType"].AsInt; }
{ if(!_json["AddType"].IsNumber) { throw new SerializationException(); } AddType = (Battle.ActorAttrAddType)_json["AddType"].AsInt; }
{ if(!_json["Value"].IsNumber) { throw new SerializationException(); } Value = _json["Value"]; }
DataType = (Battle.ActorAttrDataType)_buf.ReadInt();
AddType = (Battle.ActorAttrAddType)_buf.ReadInt();
Value = _buf.ReadFloat();
PostInit();
}
public ResAttrImpactData(Battle.ActorAttrDataType DataType, Battle.ActorAttrAddType AddType, float Value )
public static ResAttrImpactData DeserializeResAttrImpactData(ByteBuf _buf)
{
this.DataType = DataType;
this.AddType = AddType;
this.Value = Value;
PostInit();
}
public static ResAttrImpactData DeserializeResAttrImpactData(JSONNode _json)
{
return new Battle.ResAttrImpactData(_json);
return new Battle.ResAttrImpactData(_buf);
}
public Battle.ActorAttrDataType DataType { get; private set; }
@@ -65,4 +54,5 @@ public sealed partial class ResAttrImpactData : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,40 +7,26 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class SkillAttrDamageData : Bright.Config.BeanBase
{
public SkillAttrDamageData(JSONNode _json)
public SkillAttrDamageData(ByteBuf _buf)
{
{ if(!_json["MagicType"].IsNumber) { throw new SerializationException(); } MagicType = (Battle.SkillMagicType)_json["MagicType"].AsInt; }
{ if(!_json["AttrType"].IsNumber) { throw new SerializationException(); } AttrType = (Battle.SkillAttrDamageType)_json["AttrType"].AsInt; }
{ if(!_json["Param1"].IsNumber) { throw new SerializationException(); } Param1 = _json["Param1"]; }
{ if(!_json["Param2"].IsNumber) { throw new SerializationException(); } Param2 = _json["Param2"]; }
{ if(!_json["Param3"].IsNumber) { throw new SerializationException(); } Param3 = _json["Param3"]; }
{ if(!_json["MaxLimit"].IsNumber) { throw new SerializationException(); } MaxLimit = _json["MaxLimit"]; }
MagicType = (Battle.SkillMagicType)_buf.ReadInt();
AttrType = (Battle.SkillAttrDamageType)_buf.ReadInt();
Param1 = _buf.ReadFloat();
Param2 = _buf.ReadFloat();
Param3 = _buf.ReadFloat();
MaxLimit = _buf.ReadFloat();
PostInit();
}
public SkillAttrDamageData(Battle.SkillMagicType MagicType, Battle.SkillAttrDamageType AttrType, float Param1, float Param2, float Param3, float MaxLimit )
public static SkillAttrDamageData DeserializeSkillAttrDamageData(ByteBuf _buf)
{
this.MagicType = MagicType;
this.AttrType = AttrType;
this.Param1 = Param1;
this.Param2 = Param2;
this.Param3 = Param3;
this.MaxLimit = MaxLimit;
PostInit();
}
public static SkillAttrDamageData DeserializeSkillAttrDamageData(JSONNode _json)
{
return new Battle.SkillAttrDamageData(_json);
return new Battle.SkillAttrDamageData(_buf);
}
public Battle.SkillMagicType MagicType { get; private set; }
@@ -77,4 +63,5 @@ public sealed partial class SkillAttrDamageData : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,50 +7,31 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
{
public sealed partial class SkillBaseConfig : Bright.Config.BeanBase
{
public SkillBaseConfig(JSONNode _json)
public SkillBaseConfig(ByteBuf _buf)
{
{ 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); } }
Id = _buf.ReadInt();
Name = _buf.ReadString();
SkillDispID = _buf.ReadInt();
SkillType = _buf.ReadInt();
Desc = _buf.ReadString();
CostMP = _buf.ReadInt();
GCDID = _buf.ReadInt();
SkillCD = _buf.ReadFloat();
IsRepeatTrigger = _buf.ReadBool();
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);BuffID = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); BuffID.Add(_e0);}}
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AttrDamageData = new System.Collections.Generic.List<Battle.SkillAttrDamageData>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { Battle.SkillAttrDamageData _e0; _e0 = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(_buf); AttrDamageData.Add(_e0);}}
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 )
public static SkillBaseConfig DeserializeSkillBaseConfig(ByteBuf _buf)
{
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);
return new Battle.SkillBaseConfig(_buf);
}
/// <summary>
@@ -129,4 +110,5 @@ public sealed partial class SkillBaseConfig : Bright.Config.BeanBase
partial void PostInit();
partial void PostResolve();
}
}
}

View File

@@ -7,26 +7,25 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbBuff
{
public partial class TbBuff
{
private readonly Dictionary<int, Battle.BuffConfig> _dataMap;
private readonly List<Battle.BuffConfig> _dataList;
public TbBuff(JSONNode _json)
public TbBuff(ByteBuf _buf)
{
_dataMap = new Dictionary<int, Battle.BuffConfig>();
_dataList = new List<Battle.BuffConfig>();
foreach(JSONNode _row in _json.Children)
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
var _v = Battle.BuffConfig.DeserializeBuffConfig(_row);
Battle.BuffConfig _v;
_v = Battle.BuffConfig.DeserializeBuffConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.BuffID, _v);
}
@@ -57,7 +56,6 @@ public sealed partial class TbBuff
}
}
partial void PostInit();
partial void PostResolve();
}

View File

@@ -7,26 +7,25 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbBuffAttr
{
public partial class TbBuffAttr
{
private readonly Dictionary<int, Battle.BuffAttrConfig> _dataMap;
private readonly List<Battle.BuffAttrConfig> _dataList;
public TbBuffAttr(JSONNode _json)
public TbBuffAttr(ByteBuf _buf)
{
_dataMap = new Dictionary<int, Battle.BuffAttrConfig>();
_dataList = new List<Battle.BuffAttrConfig>();
foreach(JSONNode _row in _json.Children)
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
var _v = Battle.BuffAttrConfig.DeserializeBuffAttrConfig(_row);
Battle.BuffAttrConfig _v;
_v = Battle.BuffAttrConfig.DeserializeBuffAttrConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.BuffID, _v);
}
@@ -57,7 +56,6 @@ public sealed partial class TbBuffAttr
}
}
partial void PostInit();
partial void PostResolve();
}

View File

@@ -7,26 +7,25 @@
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbSkill
{
public partial class TbSkill
{
private readonly Dictionary<int, Battle.SkillBaseConfig> _dataMap;
private readonly List<Battle.SkillBaseConfig> _dataList;
public TbSkill(JSONNode _json)
public TbSkill(ByteBuf _buf)
{
_dataMap = new Dictionary<int, Battle.SkillBaseConfig>();
_dataList = new List<Battle.SkillBaseConfig>();
foreach(JSONNode _row in _json.Children)
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
var _v = Battle.SkillBaseConfig.DeserializeSkillBaseConfig(_row);
Battle.SkillBaseConfig _v;
_v = Battle.SkillBaseConfig.DeserializeSkillBaseConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
@@ -57,7 +56,6 @@ public sealed partial class TbSkill
}
}
partial void PostInit();
partial void PostResolve();
}