145 lines
3.0 KiB
C#
145 lines
3.0 KiB
C#
// 此文件由 ThriftIntegratedPipeline 自动生成,请勿手动修改
|
||
// 配置类: IndoorProgress
|
||
// 数据类: IndoorProgressItem
|
||
|
||
using UnityEngine;
|
||
using Byway.Config;
|
||
using Byway.Thrift.Data;
|
||
using UnityGameFramework.Runtime;
|
||
|
||
namespace CrazyMaple
|
||
{
|
||
/// <summary>
|
||
/// IndoorProgress 数据行
|
||
/// </summary>
|
||
public class DRIndoorProgress : DataRowBase
|
||
{
|
||
private IndoorProgressItem _configData;
|
||
|
||
/// <summary>
|
||
/// 唯一标识
|
||
/// </summary>
|
||
public override int Id
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Id ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Scene
|
||
/// </summary>
|
||
public int Scene
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Scene ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Lv
|
||
/// </summary>
|
||
public int Lv
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Lv ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Item
|
||
/// </summary>
|
||
public string Item
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Item ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Emit
|
||
/// </summary>
|
||
public string Emit
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Emit ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Reward
|
||
/// </summary>
|
||
public string Reward
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Reward ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// BigReward
|
||
/// </summary>
|
||
public string BigReward
|
||
{
|
||
get
|
||
{
|
||
return _configData?.BigReward ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// AreaReward
|
||
/// </summary>
|
||
public string AreaReward
|
||
{
|
||
get
|
||
{
|
||
return _configData?.AreaReward ?? "";
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Part
|
||
/// </summary>
|
||
public int Part
|
||
{
|
||
get
|
||
{
|
||
return _configData?.Part ?? 0;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 从配置加载数据
|
||
/// </summary>
|
||
public void LoadFromConfig(int id)
|
||
{
|
||
var config = ConfigManager.Instance.GetConfig<IndoorProgress>();
|
||
if (config?.Indoorprogresss != null)
|
||
{
|
||
config.Indoorprogresss.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;
|
||
}
|
||
}
|
||
}
|