127 lines
3.8 KiB
C#
127 lines
3.8 KiB
C#
|
|
//------------------------------------------------------------------------------
|
|
// <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)
|
|
{
|
|
WeaponType = (WeaponType)_buf.ReadInt();
|
|
LogicType = _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;
|
|
Sprite = _buf.ReadString();
|
|
Sprite_Ref = null;
|
|
}
|
|
|
|
public static WeaponConfig DeserializeWeaponConfig(ByteBuf _buf)
|
|
{
|
|
return new WeaponConfig(_buf);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 武器类型
|
|
/// </summary>
|
|
public readonly WeaponType WeaponType;
|
|
/// <summary>
|
|
/// 逻辑类型
|
|
/// </summary>
|
|
public readonly string LogicType;
|
|
/// <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;
|
|
/// <summary>
|
|
/// 图标
|
|
/// </summary>
|
|
public readonly string Sprite;
|
|
public SpriteConfig Sprite_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);
|
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "weaponType:" + WeaponType + ","
|
|
+ "logicType:" + LogicType + ","
|
|
+ "rarity:" + Rarity + ","
|
|
+ "price:" + Price + ","
|
|
+ "attack:" + Attack + ","
|
|
+ "cooldown:" + Cooldown + ","
|
|
+ "attackRange:" + AttackRange + ","
|
|
+ "attackSoundId:" + AttackSoundId + ","
|
|
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
|
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
|
+ "prefab:" + Prefab + ","
|
|
+ "sprite:" + Sprite + ","
|
|
+ "}";
|
|
}
|
|
}
|
|
|
|
}
|