From 82e8a3f6ff7aaec06d1b60463a545a8bb031f546 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 10 六月 2026 18:15:39 +0800
Subject: [PATCH] 588 公会攻防战 修复若干bug

---
 Main/System/GuildAtkDefBat/GuildAtkDefBatTreasureCell.cs |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Main/System/GuildAtkDefBat/GuildAtkDefBatTreasureCell.cs b/Main/System/GuildAtkDefBat/GuildAtkDefBatTreasureCell.cs
index c21298a..732791a 100644
--- a/Main/System/GuildAtkDefBat/GuildAtkDefBatTreasureCell.cs
+++ b/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
             {

--
Gitblit v1.8.0