红包概率取整

yuanshuai 2022-12-27 11:04:30 +08:00
parent c48eaa5fbf
commit d122e5f4cb
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ function this:OnOpen(rewardGroup)
itemListPrefab[index] = view
index=index+1
view:OnOpen(false,{itemData.itemId,itemData.itemNum},1.15,true,false,false,self.sortingOrder)
local str=string.format("获取概率:%s%%",itemData.weight/ winData[i].allWeight*100)
local str=string.format("获取概率:%s%%",math.modf(itemData.weight/ winData[i].allWeight*100))
view:ResetName(str)
end
end