29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Cielonos.MainGame.Rewards
|
|
{
|
|
/// <summary>
|
|
/// 根据当前 Combat 节点上下文,从 CombatRewardProfile 解析基础奖励列表。
|
|
/// 装备、被动或事件对奖励的修改不在这里做,而是在 RunCombatRewardSubmodule 中统一套用 modifier。
|
|
/// </summary>
|
|
public static class CombatRewardResolver
|
|
{
|
|
public static List<CombatRewardInstruction> Resolve(CombatRewardProfile profile, CombatRewardContext context)
|
|
{
|
|
if (profile == null)
|
|
{
|
|
UnityEngine.Debug.LogWarning("[CombatRewardResolver] MainGameConfig.combatRewardProfile 未配置。");
|
|
return new List<CombatRewardInstruction>();
|
|
}
|
|
|
|
List<CombatRewardInstruction> rewards = new(profile.Resolve(context.NodeType));
|
|
if (rewards.Count == 0)
|
|
{
|
|
UnityEngine.Debug.LogWarning($"[CombatRewardResolver] CombatRewardProfile 没有为节点类型 '{context.NodeType}' 配置奖励。");
|
|
}
|
|
|
|
return rewards;
|
|
}
|
|
}
|
|
}
|