lcy
2026-06-10 82e8a3f6ff7aaec06d1b60463a545a8bb031f546
Main/System/GuildAtkDefBat/GuildAtkDefBatTreasureCell.cs
@@ -11,9 +11,9 @@
    /// <param name="startIndex">起始格子序号(从1开始)</param>
    /// <param name="gridCount">总格子数</param>
    /// <param name="isWin">是否胜利</param>
    /// <param name="openedGrids">已开启的格子字典 Key=格子编号, Value=AwardID</param>
    /// <param name="openedGrids">已开启的格子字典 Key=格子编号, Value=开启记录</param>
    /// <param name="openAnimGridIndex">播放开启动画的格子编号(0=无)</param>
    public void SetData(int startIndex, int gridCount, bool isWin, Dictionary<int, int> openedGrids, int openAnimGridIndex = 0)
    public void SetData(int startIndex, int gridCount, bool isWin, Dictionary<int, GuildAtkDefBatTreasureRecord> openedGrids, int openAnimGridIndex = 0)
    {
        for (int i = 0; i < grids.Length; i++)
        {
@@ -22,9 +22,16 @@
            {
                grids[i].SetActive(true);
                int awardID = 0;
                bool isOpened = openedGrids != null && openedGrids.TryGetValue(gridIndex, out awardID);
                string playerName = string.Empty;
                GuildAtkDefBatTreasureRecord treasureRecord = null;
                bool isOpened = openedGrids != null && openedGrids.TryGetValue(gridIndex, out treasureRecord);
                if (isOpened && treasureRecord != null)
                {
                    awardID = treasureRecord.AwardID;
                    playerName = treasureRecord.PlayerName;
                }
                bool playAnim = openAnimGridIndex > 0 && gridIndex == openAnimGridIndex;
                grids[i].Init(gridIndex, isWin, isOpened, (ushort)awardID, playAnim);
                grids[i].Init(gridIndex, isWin, isOpened, (ushort)awardID, playerName, playAnim);
            }
            else
            {