소스 검색

体力礼包修复

zhangyuqian 1 년 전
부모
커밋
d13ef0fc2e
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -211,7 +211,7 @@ namespace GFGGame
 
             item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.price + mTxtOldPrice}";
             item.m_comLeftGiftBox.target.data = itemCfg;
-            item.m_comLeftGiftBox.m_loaIcon.onClick.Add(OnListSelectorItemClick);
+            item.m_comLeftGiftBox.target.onClick.Add(OnListSelectorItemClick);
 
             if (shopCfg.originalPrice != shopCfg.price)
             {
@@ -330,7 +330,7 @@ namespace GFGGame
 
             item.m_list.data = shopCfg;
             item.m_list.itemRenderer = ChildListItemRender;
-            item.m_list.onClickItem.Add(OnListSelectorItemClick);
+            //item.m_list.onClickItem.Add(OnListSelectorItemClick);
             item.m_list.numItems = numItems;
         }
 
@@ -432,6 +432,7 @@ namespace GFGGame
             var itemArr = result[index];
             var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
             uiItemChild.target.data = itemCfgChild;
+            uiItemChild.target.onClick.Add(OnListSelectorItemClick);
             uiItemChild.m_txtCount.text = itemArr[1].ToString();
             uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
             uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
@@ -442,7 +443,7 @@ namespace GFGGame
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
-            GComponent item = context.data as GComponent;
+            GObject item = context.sender as GObject;
             ItemCfg itemCfg = item.data as ItemCfg;
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }