【易经宝库】提交

dev_chengFeng
ZhangBiao 2022-01-06 18:27:09 +08:00
parent 1373efaba8
commit e0c228bf3f
1 changed files with 16 additions and 15 deletions

View File

@ -137,32 +137,33 @@ function this:SetSingleData(index,item,data)
end end
local aData = this.GetDataByRewardId(data.Id) local aData = this.GetDataByRewardId(data.Id)
-- LogRed(aData.rewardId..""..tostring(aData.progress)) -- LogRed(aData.rewardId..""..tostring(aData.progress))
-- if aData.progress >= data.InitializeNum then if not aData then--2022/1/6 易经宝库增加层数容错
-- t3 = false aData = {}
-- -- 如果是当前层选中的特殊奖励 aData.progress = data.InitializeNum
-- if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum end
-- t3 = true if aData.progress >= data.InitializeNum then
-- end t3 = false
-- num.text = "<color=red>"..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."</color>" -- 如果是当前层选中的特殊奖励
-- else if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum
-- t3 = true t3 = true
-- num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum end
-- end num.text = "<color=red>"..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."</color>"
else
t3 = true
num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum
end
-- select:SetActive(t1 and t2 and t3) select:SetActive(t1 and t2 and t3)
end end
-- 获取数量 -- 获取数量
function this.GetDataByRewardId(rId) function this.GetDataByRewardId(rId)
LogPink("rId:"..tostring(rId))
for k, v in ipairs(ActData.allData) do for k, v in ipairs(ActData.allData) do
LogGreen("v.rewardId:"..tostring(v.rewardId))
if v.rewardId == rId then if v.rewardId == rId then
return v return v
end end
end end
LogError("rId:"..tostring(rId))
end end