迁移数据表到 Luban,移除 JsonNet、EnumUtility
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Luban;
|
||||
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
{
|
||||
public WeaponConfig(ByteBuf _buf)
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
Name = _buf.ReadString();
|
||||
Rarity = (Rarity)_buf.ReadInt();
|
||||
Price = _buf.ReadInt();
|
||||
Attack = _buf.ReadInt();
|
||||
Cooldown = _buf.ReadInt();
|
||||
AttackRange = _buf.ReadInt();
|
||||
AttackSoundId = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Parameters = new System.Collections.Generic.Dictionary<ParamType, int>(n0 * 3 / 2);for(var i0 = 0 ; i0 < n0 ; i0++) { ParamType _k0; _k0 = (ParamType)_buf.ReadInt(); int _v0; _v0 = _buf.ReadInt(); Parameters.Add(_k0, _v0);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
||||
Prefab = _buf.ReadString();
|
||||
Prefab_Ref = null;
|
||||
}
|
||||
|
||||
public static WeaponConfig DeserializeWeaponConfig(ByteBuf _buf)
|
||||
{
|
||||
return new WeaponConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 武器id
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
/// <summary>
|
||||
/// 武器名
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
/// <summary>
|
||||
/// 道具品质
|
||||
/// </summary>
|
||||
public readonly Rarity Rarity;
|
||||
/// <summary>
|
||||
/// 武器价格
|
||||
/// </summary>
|
||||
public readonly int Price;
|
||||
/// <summary>
|
||||
/// 伤害
|
||||
/// </summary>
|
||||
public readonly int Attack;
|
||||
/// <summary>
|
||||
/// 冷却
|
||||
/// </summary>
|
||||
public readonly int Cooldown;
|
||||
/// <summary>
|
||||
/// 范围
|
||||
/// </summary>
|
||||
public readonly int AttackRange;
|
||||
/// <summary>
|
||||
/// 攻击音效编号
|
||||
/// </summary>
|
||||
public readonly int AttackSoundId;
|
||||
/// <summary>
|
||||
/// 参数类型
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.Dictionary<ParamType, int> Parameters;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
/// <summary>
|
||||
/// 预制体
|
||||
/// </summary>
|
||||
public readonly string Prefab;
|
||||
public EntityConfig Prefab_Ref;
|
||||
|
||||
public const int __ID__ = 127041694;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "price:" + Price + ","
|
||||
+ "attack:" + Attack + ","
|
||||
+ "cooldown:" + Cooldown + ","
|
||||
+ "attackRange:" + AttackRange + ","
|
||||
+ "attackSoundId:" + AttackSoundId + ","
|
||||
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user