【易经宝库】修服选中大奖后次数显示异常

dev_chengFeng
gaoxin 2021-09-18 18:40:21 +08:00
parent a628176640
commit 2ca77d75ef
1 changed files with 16 additions and 5 deletions

View File

@ -136,17 +136,18 @@ function this:SetSingleData(index,item,data)
limit2.text = Language[10262]..data.FloorLimit..Language[10762]
t2 = false
end
-- LogRed(ActData.allData[index].rewardId..""..tostring(ActData.allData[index].progress))
if ActData.allData[index].progress >= data.InitializeNum then
local aData = this.GetDataByRewardId(data.Id)
-- LogRed(aData.rewardId..""..tostring(aData.progress))
if aData.progress >= data.InitializeNum then
t3 = false
-- 如果是当前层选中的特殊奖励
if ActData.allData[index].progress == data.InitializeNum and ActData.selectId == data.Id then--and ActData.curLevel > data.InitializeNum
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-ActData.allData[index].progress).."/"..data.InitializeNum.."</color>"
num.text = "<color=red>"..(data.InitializeNum-aData.progress).."/"..data.InitializeNum.."</color>"
else
t3 = true
num.text = (data.InitializeNum-ActData.allData[index].progress).."/"..data.InitializeNum
num.text = (data.InitializeNum - aData.progress).."/"..data.InitializeNum
end
num.gameObject:SetActive(t1 and t2)
@ -154,6 +155,16 @@ function this:SetSingleData(index,item,data)
end
-- 获取数量
function this.GetDataByRewardId(rId)
for k, v in ipairs(ActData.allData) do
if v.rewardId == rId then
return v
end
end
end
function this:OnClose()
end