//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace G { using System.Collections; using System.Collections.Generic; using F; using F.Item; /// /// Generated from: boxdrop.xlsx /// public partial class ItemBox : Item, IItem { public const string ASSET_NAME = "boxdrop"; /// /// 掉落类型 1:M选N 2:M选1 /// index:1 /// public int type { get; private set; } /// /// 掉落上限 (仅对M选N类型生效) /// index:2 /// public int[] typeArgs { get; private set; } /// /// 掉落道具 /// index:3 /// public int[][] items { get; private set; } /// /// [id,weight,max,min] /// index:4 /// public int[] extra { get; private set; } /// /// 宝箱名字 /// index:5 /// public string name { get; private set; } /// /// 品质 /// index:6 /// public int quality { get; private set; } /// /// [id,count] /// index:7 /// public int[] price { get; private set; } public void Load(IList 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 dictionary, List 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)list[i]); result.Add(item); } return true; } private static ItemBox CreateThis() { return new ItemBox(); } } }