136 lines
2.8 KiB
C#
136 lines
2.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>
|
||
//------------------------------------------------------------------------------
|
||
|
||
namespace G
|
||
{
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using F;
|
||
using F.Item;
|
||
|
||
/// <summary>
|
||
/// Generated from: item.xlsx
|
||
/// </summary>
|
||
public partial class ItemEquipment : Item, IItem
|
||
{
|
||
public const string ASSET_NAME = "item";
|
||
|
||
/// <summary>
|
||
/// 资源名 资源名_类型_等级_序号
|
||
/// index:1
|
||
/// </summary>
|
||
public string assets
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 装备类型 0:武器 1:头盔 2:首饰 3:盔甲 4:腰饰 5:鞋子
|
||
/// index:2
|
||
/// </summary>
|
||
public int type
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 武器类型 1:刀 2:双手武器 3:长兵器 4:弓箭 5:权杖 6:魔法
|
||
/// index:3
|
||
/// </summary>
|
||
public int subType
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 武器属性 [[属性类型,最大值,最小值,权重],[属性类型,最大值,最小值,权重]..]
|
||
/// index:4
|
||
/// </summary>
|
||
public int[][] basicAttributes
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 基础属性 [[属性类型,最大值,最小值],[属性类型,最大值,最小值]..]
|
||
/// index:5
|
||
/// </summary>
|
||
public int[][] extraAttributes
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 特殊属性 [[属性类型,最大值,最小值,权重],[]...]
|
||
/// index:6
|
||
/// </summary>
|
||
public int[][] specialAttributes
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// [id,w,id,w]
|
||
/// index:7
|
||
/// </summary>
|
||
public int[] suit
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 战力
|
||
/// index:8
|
||
/// </summary>
|
||
public int combatValue
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
public void Load(IList<object> list)
|
||
{
|
||
id = list.GetInt(0);
|
||
assets = list.GetString(1);
|
||
type = list.GetInt(2);
|
||
subType = list.GetInt(3);
|
||
basicAttributes = list.GetIntArray2(4);
|
||
extraAttributes = list.GetIntArray2(5);
|
||
specialAttributes = list.GetIntArray2(6);
|
||
suit = list.GetIntArray(7);
|
||
combatValue = list.GetInt(8);
|
||
}
|
||
|
||
public static bool LoadAll(IDictionary<string, object> dictionary, List<ItemEquipment> result)
|
||
{
|
||
if (result == null)
|
||
{
|
||
return false;
|
||
}
|
||
var list = dictionary.GetList("Equipment");
|
||
if (list == null || list.Count == 0)
|
||
{
|
||
return false;
|
||
}
|
||
int i = 0;
|
||
for (int c = list.Count; i < c; i++)
|
||
{
|
||
var item = CreateThis();
|
||
item.Load((IList<object>)list[i]);
|
||
result.Add(item);
|
||
}
|
||
return true;
|
||
}
|
||
|
||
private static ItemEquipment CreateThis()
|
||
{
|
||
return new ItemEquipment();
|
||
}
|
||
}
|
||
}
|