From 89c796115462658645a2a41742a9b47c70b7433c Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 22 Oct 2020 03:24:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=A4=BC=E5=8C=85=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/UpGradePackage/UpGradePackagePanel.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/UpGradePackage/UpGradePackagePanel.lua b/Assets/ManagedResources/~Lua/Modules/UpGradePackage/UpGradePackagePanel.lua index 0b495ad118..f6b1bbbc83 100644 --- a/Assets/ManagedResources/~Lua/Modules/UpGradePackage/UpGradePackagePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/UpGradePackage/UpGradePackagePanel.lua @@ -61,12 +61,11 @@ function this:BindEvent() curIndex = curIndex - 1 if curGiftList[curType][curIndex] then else - for i = curType - 1,0,-1 do - if not activityType[i] then + while(curType <= 0) do + if not activityType[curType] then curType = LengthOfTable(activityType) - i = LengthOfTable(activityType) else - curType = i + curType = curType - 1 end if curGiftList[curType] and #curGiftList[curType] > 0 then curIndex = #curGiftList[curType] @@ -83,12 +82,11 @@ function this:BindEvent() curIndex = curIndex + 1 if curGiftList[curType][curIndex] then else - for i = curType + 1,LengthOfTable(activityType),1 do - if not activityType[i] then + while(curType <= LengthOfTable(activityType) + 1) do + if not activityType[curType] then curType = 1 - i = 1 else - curType = i + curType = curType + 1 end if curGiftList[curType] and #curGiftList[curType] > 0 then curIndex = 1