商店报错
This commit is contained in:
parent
32534e7880
commit
3d2008baad
@ -89,7 +89,7 @@ function BoxSellCell:refreshCost()
|
|||||||
local costItem2, cost2 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_2)
|
local costItem2, cost2 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_2)
|
||||||
local costItem3, cost3 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_3)
|
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))
|
self.boxBuyBtnCoin1:setSprite(GFunc.getIconRes(costItem1.id))
|
||||||
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_1)
|
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_1)
|
||||||
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
||||||
@ -100,7 +100,7 @@ function BoxSellCell:refreshCost()
|
|||||||
end
|
end
|
||||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin1, self.boxBuyBtnTx1, 5)
|
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))
|
self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(costItem2.id))
|
||||||
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_2)
|
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_2)
|
||||||
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
||||||
@ -111,7 +111,7 @@ function BoxSellCell:refreshCost()
|
|||||||
end
|
end
|
||||||
GFunc.centerImgAndTx(self.boxBuyBtnCoin2, self.boxBuyBtnTx2, 5)
|
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))
|
self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(costItem3.id))
|
||||||
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_3)
|
local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_3)
|
||||||
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99"
|
||||||
|
|||||||
@ -33,7 +33,8 @@ function HotCell:refresh(data)
|
|||||||
local reward = cfgInfo.good and cfgInfo.good[index]
|
local reward = cfgInfo.good and cfgInfo.good[index]
|
||||||
local cost = cfgInfo.cost and cfgInfo.cost[index]
|
local cost = cfgInfo.cost and cfgInfo.cost[index]
|
||||||
|
|
||||||
local isHeroReward = id ~= 1 -- 约定
|
-- local isHeroReward = id ~= 1 -- 约定
|
||||||
|
local isHeroReward = false
|
||||||
local isFree = id == 1 -- 约定
|
local isFree = id == 1 -- 约定
|
||||||
|
|
||||||
if isHeroReward then
|
if isHeroReward then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user