【社稷大典】长按贡献数量不够无法捐赠bug修复

ZhangBiao 2020-10-26 12:23:04 +08:00
parent 6407abc8c9
commit e6610518ce
1 changed files with 9 additions and 3 deletions

View File

@ -219,7 +219,9 @@ function this.OnPointerUp(Pointgo,data)--抬起
this:RefreshBottom(numCount)
this:RequestDonate(numCount)
else
this:RequestDonate(numCount-t)
if itemData[curItemIndex].leftNum > 0 then
this:RequestDonate(numCount-t)
end
end
isPressed = false
isShortPress = false
@ -239,6 +241,10 @@ function this.OnUpdate()
end
--发送捐献请求
function this:RequestDonate(numCount)
if numCount == 0 then
PopupTipPanel.ShowTip(Language[11197])
return
end
if trigger and numCount == 1 then
trigger = false
this:Refresh()
@ -285,10 +291,10 @@ function this:RefreshBottom(num)
else--实时更新进度条
--要判断是否还有道具进行捐献
if itemData[curItemIndex].leftNum - num < 0 then
PopupTipPanel.ShowTip(Language[11197])
this:RequestDonate(num - 1)
trigger = true
isPressed = false
return
-- return
end
itemData[curItemIndex].num.text = itemData[curItemIndex].leftNum - num
score = itemData[curItemIndex].value * num