From 4d9d9709076abaf304c23b84b259548049119df6 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 8 Jun 2021 20:27:00 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID1009372=E3=80=91=20=E7=82=B9?= =?UTF-8?q?=E5=B0=86=E5=8F=B010=E8=BF=9E=E8=B7=B3=E8=BF=87=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E6=A9=99=E5=B0=86=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Recruit/SingleRecruitPanel.lua | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index f4bc8ee4b4..bdc4ce2114 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -31,6 +31,7 @@ this.time3 = Timer.New() local Sound_Recruit2 local Sound_Recruit3 local Sound_Recruit4 +local isJump = 0 --初始化组件(用于子类重写) function SingleRecruitPanel:InitComponent() @@ -133,6 +134,7 @@ function SingleRecruitPanel:BindEvent() end) --十连跳过按钮 直接打开十连抽展示界面 Util.AddClick(this.jumpBtn, function() + isJump = 1 Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnBtnClicked, self.uiConfig.id,this.jumpBtn.name) isFirst=true this.CloseAllTimer() @@ -147,11 +149,27 @@ function SingleRecruitPanel:BindEvent() this.info:SetActive(false) end else - if lotterySetting[type].LotteryType == 11 then - isFirst=false + -- if lotterySetting[type].LotteryType == 11 then + -- isFirst=false + -- end + isFirst=false + local tempHeroTable = {} + for i = index,#_heroTable do + if heroConfigData[_heroTable[i].heroId].Star == 5 then + table.insert(tempHeroTable,_heroTable[i]) + end end - self:ClosePanel() - UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType) + _heroTable = tempHeroTable + index = 0 + if LengthOfTable(_heroTable)>0 then + this.CloseAllTimer() + self:TenOpenPanel() + else + self:ClosePanel() + UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType) + end + -- self:ClosePanel() + -- UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType) end this.jumpBtnGo:SetActive(false) this.StopPanelSound() @@ -204,6 +222,7 @@ end --界面打开时调用(用于子类重写) function SingleRecruitPanel:OnOpen(...) + isJump = 0 this.UI_Effect_open:SetActive(true) Sound_Recruit4 = SoundManager.PlaySound(SoundConfig.Sound_Recruit4) this.UI_Effect_choukaSSR:SetActive(false) @@ -303,7 +322,7 @@ function SingleRecruitPanel:TenOpenPanel() end, 4) this.time3:Start() elseif state==2 then-- 十连抽 - -- timeNum2=0 + timeNum2=0 --this.UI_Effect_choukaSSR:SetActive(false) --this.UI_Effect_choukaSR:SetActive(false) --this.UI_Effect_choukaR:SetActive(false)