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