126 lines
2.2 KiB
C#
126 lines
2.2 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: boxdrop.xlsx
|
||
/// </summary>
|
||
public partial class ItemBox : Item, IItem
|
||
{
|
||
public const string ASSET_NAME = "boxdrop";
|
||
|
||
/// <summary>
|
||
/// 掉落类型 1:M选N 2:M选1
|
||
/// index:1
|
||
/// </summary>
|
||
public int type
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 掉落上限 (仅对M选N类型生效)
|
||
/// index:2
|
||
/// </summary>
|
||
public int[] typeArgs
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 掉落道具
|
||
/// index:3
|
||
/// </summary>
|
||
public int[][] items
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// [id,weight,max,min]
|
||
/// index:4
|
||
/// </summary>
|
||
public int[] extra
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 宝箱名字
|
||
/// index:5
|
||
/// </summary>
|
||
public string name
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 品质
|
||
/// index:6
|
||
/// </summary>
|
||
public int quality
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// [id,count]
|
||
/// index:7
|
||
/// </summary>
|
||
public int[] price
|
||
{
|
||
get; private set;
|
||
}
|
||
|
||
public void Load(IList<object> list)
|
||
{
|
||
id = list.GetInt(0);
|
||
type = list.GetInt(1);
|
||
typeArgs = list.GetIntArray(2);
|
||
items = list.GetIntArray2(3);
|
||
extra = list.GetIntArray(4);
|
||
name = list.GetString(5);
|
||
quality = list.GetInt(6);
|
||
price = list.GetIntArray(7);
|
||
}
|
||
|
||
public static bool LoadAll(IDictionary<string, object> dictionary, List<ItemBox> result)
|
||
{
|
||
if (result == null)
|
||
{
|
||
return false;
|
||
}
|
||
var list = dictionary.GetList("Box");
|
||
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 ItemBox CreateThis()
|
||
{
|
||
return new ItemBox();
|
||
}
|
||
}
|
||
}
|