2025-05-18 01:04:31 +08:00

146 lines
2.5 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: city.xlsx
/// </summary>
public partial class ItemCity : Item, IItem
{
public const string ASSET_NAME = "city";
/// <summary>
/// 主事件标识
/// index:1
/// </summary>
public int type
{
get; private set;
}
/// <summary>
/// 每秒产出类型与数量
/// index:2
/// </summary>
public int[] rewards
{
get; private set;
}
/// <summary>
/// 挑战关卡id
/// index:3
/// </summary>
public int levelId
{
get; private set;
}
/// <summary>
///
/// index:4
/// </summary>
public string name
{
get; private set;
}
/// <summary>
/// 文本
/// index:5
/// </summary>
public string description
{
get; private set;
}
/// <summary>
/// 章节名位置
/// index:6
/// </summary>
public int[] iconPos
{
get; private set;
}
/// <summary>
///
/// index:7
/// </summary>
public string[] icon
{
get; private set;
}
/// <summary>
///
/// index:8
/// </summary>
public int unlock
{
get; private set;
}
/// <summary>
/// [id,weight,...]
/// index:9
/// </summary>
public int[] events
{
get; private set;
}
public void Load(IList<object> list)
{
id = list.GetInt(0);
type = list.GetInt(1);
rewards = list.GetIntArray(2);
levelId = list.GetInt(3);
name = list.GetString(4);
description = list.GetString(5);
iconPos = list.GetIntArray(6);
icon = list.GetStringArray(7);
unlock = list.GetInt(8);
events = list.GetIntArray(9);
}
public static bool LoadAll(IDictionary<string, object> dictionary, List<ItemCity> result)
{
if (result == null)
{
return false;
}
var list = dictionary.GetList("City");
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 ItemCity CreateThis()
{
return new ItemCity();
}
}
}