Phase2.1 添加武器tag配置和数据表定义
This commit is contained in:
@@ -16,8 +16,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
{
|
||||
public WeaponConfig(ByteBuf _buf)
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
WeaponType = (WeaponType)_buf.ReadInt();
|
||||
WeaponName = _buf.ReadString();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Tags = new System.Collections.Generic.List<WeaponTag>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { WeaponTag _e0; _e0 = (WeaponTag)_buf.ReadInt(); Tags.Add(_e0);}}
|
||||
LogicType = _buf.ReadString();
|
||||
ScalingStat = (StatType)_buf.ReadInt();
|
||||
ScalingRatio = _buf.ReadFloat();
|
||||
Rarity = (Rarity)_buf.ReadInt();
|
||||
Price = _buf.ReadInt();
|
||||
Attack = _buf.ReadInt();
|
||||
@@ -38,15 +43,35 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
return new WeaponConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 武器编号
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
/// <summary>
|
||||
/// 武器类型
|
||||
/// </summary>
|
||||
public readonly WeaponType WeaponType;
|
||||
/// <summary>
|
||||
/// 武器名
|
||||
/// </summary>
|
||||
public readonly string WeaponName;
|
||||
/// <summary>
|
||||
/// 武器标签列表
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.List<WeaponTag> Tags;
|
||||
/// <summary>
|
||||
/// 逻辑类型
|
||||
/// </summary>
|
||||
public readonly string LogicType;
|
||||
/// <summary>
|
||||
/// 加成主属性
|
||||
/// </summary>
|
||||
public readonly StatType ScalingStat;
|
||||
/// <summary>
|
||||
/// 主属性加成系数
|
||||
/// </summary>
|
||||
public readonly float ScalingRatio;
|
||||
/// <summary>
|
||||
/// 道具品质
|
||||
/// </summary>
|
||||
public readonly Rarity Rarity;
|
||||
@@ -105,6 +130,11 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
@@ -113,8 +143,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "weaponType:" + WeaponType + ","
|
||||
+ "weaponName:" + WeaponName + ","
|
||||
+ "tags:" + Luban.StringUtil.CollectionToString(Tags) + ","
|
||||
+ "logicType:" + LogicType + ","
|
||||
+ "scalingStat:" + ScalingStat + ","
|
||||
+ "scalingRatio:" + ScalingRatio + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "price:" + Price + ","
|
||||
+ "attack:" + Attack + ","
|
||||
|
||||
Reference in New Issue
Block a user