145 lines
3.0 KiB
C#
145 lines
3.0 KiB
C#
// 此文件由 ThriftIntegratedPipeline 自动生成,请勿手动修改
|
||
// 配置类: PetDressItem
|
||
// 数据类: PetDressItemItem
|
||
|
||
using UnityEngine;
|
||
using Byway.Config;
|
||
using Byway.Thrift.Data;
|
||
using UnityGameFramework.Runtime;
|
||
|
||
namespace CrazyMaple
|
||
{
|
||
/// <summary>
|
||
/// PetDressItem 数据行
|
||
/// </summary>
|
||
public class DRPetDressItem : DataRowBase
|
||
{
|
||
private PetDressItemItem _configData;
|
||
|
||
/// <summary>
|
||
/// 唯一标识
|
||
/// </summary>
|
||
public override int Id
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Id ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// GroupId
|
||
/// </summary>
|
||
public int GroupId
|
||
{
|
||
get
|
||
{
|
||
return _configData?.GroupId ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Icon
|
||
/// </summary>
|
||
public string Icon
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Icon ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// PetModel
|
||
/// </summary>
|
||
public string PetModel
|
||
{
|
||
get
|
||
{
|
||
return _configData?.PetModel ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// PartModel
|
||
/// </summary>
|
||
public string PartModel
|
||
{
|
||
get
|
||
{
|
||
return _configData?.PartModel ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Part
|
||
/// </summary>
|
||
public string Part
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Part ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Texture
|
||
/// </summary>
|
||
public string Texture
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Texture ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Mutex
|
||
/// </summary>
|
||
public string Mutex
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Mutex ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Show
|
||
/// </summary>
|
||
public int Show
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Show ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 从配置加载数据
|
||
/// </summary>
|
||
public void LoadFromConfig(int id)
|
||
{
|
||
var config = ConfigManager.Instance.GetConfig<PetDressItem>();
|
||
if (config?.Petdressitems != null)
|
||
{
|
||
config.Petdressitems.TryGetValue(id, out _configData);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 解析数据行(兼容旧系统,实际使用 LoadFromConfig)
|
||
/// </summary>
|
||
public override bool ParseDataRow(string dataRowString, object userData)
|
||
{
|
||
int id = 0;
|
||
if (int.TryParse(dataRowString, out id))
|
||
{
|
||
LoadFromConfig(id);
|
||
return _configData != null;
|
||
}
|
||
return false;
|
||
}
|
||
}
|
||
}
|