This commit is contained in:
2026-10-08 07:25:02 +08:00
parent fd100521f9
commit 3940299dbd
23 changed files with 6266 additions and 92 deletions
@@ -175,14 +175,22 @@ public class UIHome_BY_RankPanel : SubUIBase
return gold.ToString("N0");
}
/// <summary>根据排行类型和排名查找奖励道具</summary>
/// <summary>根据排行类型和排名查找奖励道具(服务端gold/diamond在奖励层级而非items里,合成type=1/2条目与items合并显示)</summary>
private List<GiftConfig> GetRankRewards(int rank)
{
if (_rankingRewardConfig == null || !_rankingRewardConfig.isEnabled) return null;
var group = _rankingRewardConfig.groups?.Find(g => g.rankingType == _currentRankType);
if (group?.rewards == null) return null;
var match = group.rewards.Find(r => rank >= r.rankMin && rank <= r.rankMax);
return match?.items;
if (match == null) return null;
var list = new List<GiftConfig>();
if (match.gold > 0)
list.Add(new GiftConfig { type = 1, isRandom = false, count = (int)match.gold });
if (match.diamond > 0)
list.Add(new GiftConfig { type = 2, isRandom = false, count = match.diamond });
if (match.items != null) list.AddRange(match.items);
return list.Count > 0 ? list : null;
}
private void ClearRankList()