Design_SubModule/Scripts/DR_Generated/DRChampshipRankReward.cs
2026-01-19 20:24:21 +08:00

123 lines
2.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 此文件由 ThriftIntegratedPipeline 自动生成,请勿手动修改
// 配置类: ChampshipRankReward
// 数据类: ChampshipRankRewardItem
using UnityEngine;
using Byway.Config;
using Byway.Thrift.Data;
using UnityGameFramework.Runtime;
namespace CrazyMaple
{
/// <summary>
/// ChampshipRankReward 数据行
/// </summary>
public class DRChampshipRankReward : DataRowBase
{
private ChampshipRankRewardItem _configData;
/// <summary>
/// 唯一标识
/// </summary>
public override int Id
{
get
{
return _configData?.Id ?? 0;
}
}
/// <summary>
/// Rank
/// </summary>
public int Rank
{
get
{
return _configData?.Rank ?? 0;
}
}
/// <summary>
/// ItemReward
/// </summary>
public string ItemReward
{
get
{
return _configData?.ItemReward ?? "";
}
}
/// <summary>
/// People30
/// </summary>
public float People30
{
get
{
return System.Convert.ToSingle(_configData?.People30 ?? 0.0);
}
}
/// <summary>
/// People50
/// </summary>
public float People50
{
get
{
return System.Convert.ToSingle(_configData?.People50 ?? 0.0);
}
}
/// <summary>
/// People80
/// </summary>
public float People80
{
get
{
return System.Convert.ToSingle(_configData?.People80 ?? 0.0);
}
}
/// <summary>
/// People100
/// </summary>
public float People100
{
get
{
return System.Convert.ToSingle(_configData?.People100 ?? 0.0);
}
}
/// <summary>
/// 从配置加载数据
/// </summary>
public void LoadFromConfig(int id)
{
var config = ConfigManager.Instance.GetConfig<ChampshipRankReward>();
if (config?.Champshiprankrewards != null)
{
config.Champshiprankrewards.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;
}
}
}