From e901bd9d3b9cf7c4e9ace7cb4011e82a29b1818c Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 30 Dec 2021 22:37:35 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BD=A9=E8=BE=95=E5=AE=9D=E9=95=9C?= =?UTF-8?q?=E3=80=91=E9=80=9A=E5=85=B3=E5=88=B0=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E5=B1=82=EF=BC=8C=E6=89=93=E5=BC=80=E7=95=8C=E9=9D=A2=E6=97=B6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BD=8D=E7=BD=AE=E6=B2=A1=E6=9C=89=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=9C=A8=E6=9C=80=E6=96=B0=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua index 0aeb284527..b40343cedd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua @@ -145,13 +145,17 @@ function this:SwitchView(isNotAni) table.insert(list, go) end ,true,isNotAni) - local t = 1 + local t = 0 for k,v in ipairs(dataList) do if v.state == 1 then t = k break end end + -- t = 0说明没有找到可以挑战的关卡,也就是全部通关了 + if t <= 0 then + t = #dataList + end this.ScrollView:SetIndex(t - 1 < 1 and 1 or (t - 1)) end