Prechádzať zdrojové kódy

服装升级奖励领取提示错误问题

huangxiaoyue 1 rok pred
rodič
commit
347001e4de

+ 9 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingRewardView.cs

@@ -69,11 +69,18 @@ namespace GFGGame
             itemReward.m_QualityType.selectedIndex = itemCfg.rarity - 1;
             RarityIconController.UpdateRarityIcon(itemReward.m_loaRarity, itemCfg.id, false);
             if (itemReward.target.data == null)
-                itemReward.target.onClick.Add(() => { GoodsItemTipsController.ShowItemTips(cfg.rewardsArr[0][0]); });
+                itemReward.target.onClick.Add(OnClickItemReward);
 
-            itemReward.target.data = index;
+            itemReward.target.data = cfg.rewardsArr[0][0];
             UI_ComItem.ProxyEnd();
             UI_ListRewardItem.ProxyEnd();
         }
+
+        public void OnClickItemReward(EventContext context)
+        {
+            if (!(context.sender is GObject obj)) return;
+            int itemID = (int)obj.data;
+            GoodsItemTipsController.ShowItemTips(itemID);
+        }
     }
 }