【易经宝库】提交
parent
1373efaba8
commit
e0c228bf3f
|
@ -137,32 +137,33 @@ function this:SetSingleData(index,item,data)
|
|||
end
|
||||
local aData = this.GetDataByRewardId(data.Id)
|
||||
-- LogRed(aData.rewardId..":"..tostring(aData.progress))
|
||||
-- if aData.progress >= data.InitializeNum then
|
||||
-- t3 = false
|
||||
-- -- 如果是当前层选中的特殊奖励
|
||||
-- if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum
|
||||
-- t3 = true
|
||||
-- end
|
||||
-- num.text = "<color=red>"..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."</color>"
|
||||
-- else
|
||||
-- t3 = true
|
||||
-- num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum
|
||||
-- end
|
||||
if not aData then--2022/1/6 易经宝库增加层数容错
|
||||
aData = {}
|
||||
aData.progress = data.InitializeNum
|
||||
end
|
||||
if aData.progress >= data.InitializeNum then
|
||||
t3 = false
|
||||
-- 如果是当前层选中的特殊奖励
|
||||
if aData.progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum
|
||||
t3 = true
|
||||
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
|
||||
|
||||
-- 获取数量
|
||||
function this.GetDataByRewardId(rId)
|
||||
LogPink("rId:"..tostring(rId))
|
||||
for k, v in ipairs(ActData.allData) do
|
||||
LogGreen("v.rewardId:"..tostring(v.rewardId))
|
||||
if v.rewardId == rId then
|
||||
return v
|
||||
end
|
||||
end
|
||||
LogError("rId:"..tostring(rId))
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue