From 3d2008baad4a5a015f5057fe6ae48f9a16ec8ef9 Mon Sep 17 00:00:00 2001 From: kai <413323644@qq.com> Date: Sun, 29 Jun 2025 10:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=BA=97=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/shop/cell/box_sell_cell.lua | 6 +++--- lua/app/ui/shop/cell/hot_cell.lua | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/app/ui/shop/cell/box_sell_cell.lua b/lua/app/ui/shop/cell/box_sell_cell.lua index 1ec1add4..c1b08fcd 100644 --- a/lua/app/ui/shop/cell/box_sell_cell.lua +++ b/lua/app/ui/shop/cell/box_sell_cell.lua @@ -89,7 +89,7 @@ function BoxSellCell:refreshCost() local costItem2, cost2 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_2) local costItem3, cost3 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_3) - if GFunc.checkCost(costItem1.id, costItem1.num, false) then + if not cost1 or GFunc.checkCost(costItem1.id, costItem1.num, false) then self.boxBuyBtnCoin1:setSprite(GFunc.getIconRes(costItem1.id)) local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_1) local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" @@ -100,7 +100,7 @@ function BoxSellCell:refreshCost() end GFunc.centerImgAndTx(self.boxBuyBtnCoin1, self.boxBuyBtnTx1, 5) - if GFunc.checkCost(costItem2.id, costItem2.num, false) then + if not cost2 or GFunc.checkCost(costItem2.id, costItem2.num, false) then self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(costItem2.id)) local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_2) local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" @@ -111,7 +111,7 @@ function BoxSellCell:refreshCost() end GFunc.centerImgAndTx(self.boxBuyBtnCoin2, self.boxBuyBtnTx2, 5) - if GFunc.checkCost(costItem3.id, costItem3.num, false) then + if not cost3 or GFunc.checkCost(costItem3.id, costItem3.num, false) then self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(costItem3.id)) local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_3) local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" diff --git a/lua/app/ui/shop/cell/hot_cell.lua b/lua/app/ui/shop/cell/hot_cell.lua index 439cac53..79e8ee0d 100644 --- a/lua/app/ui/shop/cell/hot_cell.lua +++ b/lua/app/ui/shop/cell/hot_cell.lua @@ -33,7 +33,8 @@ function HotCell:refresh(data) local reward = cfgInfo.good and cfgInfo.good[index] local cost = cfgInfo.cost and cfgInfo.cost[index] - local isHeroReward = id ~= 1 -- 约定 + -- local isHeroReward = id ~= 1 -- 约定 + local isHeroReward = false local isFree = id == 1 -- 约定 if isHeroReward then