From 1c9ae3884b30478df7afd47a46546e70d4e6e7fb Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 8 May 2021 14:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=8A=B1=E8=99=9A=E5=9D=9B=E3=80=91?= =?UTF-8?q?=E7=BD=AE=E6=8D=A2=E7=95=8C=E9=9D=A2=E7=A9=BA=E7=99=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/CompoundHero_Replace.lua | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua index 993af63811..742e5f3db1 100644 --- a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua +++ b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua @@ -56,7 +56,6 @@ function this:BindEvent() else NetManager.SaveHeroChangeRequest(curSelectHero.dynamicId,function (msg) HeroManager.ResetHeroChangeId(curSelectHero.dynamicId,msg.heroTempId)--改变英雄changeId - this.replaceHero:SetActive(true) this.cancelBtn:SetActive(true) this.replaceBtn:SetActive(false) @@ -65,9 +64,7 @@ function this:BindEvent() this.replaceBg:SetActive(false) this.text:SetActive(false) this.cost:SetActive(false) - this.ShowCostInfo() - local value = this.RebuildData(msg.heroTempId,curSelectHero) this.SetHero(this.replaceHero,value) end) @@ -77,7 +74,6 @@ function this:BindEvent() Util.AddClick(this.cancelBtn,function() NetManager.CancelHeroChangeRequest(curSelectHero.dynamicId,function (msg) HeroManager.ResetHeroChangeId(curSelectHero.dynamicId)--改变英雄changeId - this.replaceHero:SetActive(false) this.needHero:SetActive(true) this.cancelBtn:SetActive(false) @@ -87,39 +83,26 @@ function this:BindEvent() this.replaceBg:SetActive(true) this.text:SetActive(false) this.cost:SetActive(true) - this.ShowCostInfo() - end) end) --保存置换 Util.AddClick(this.saveBtn,function() NetManager.DoHeroChangeRequest(curSelectHero.dynamicId,function (msg) - this.replaceHero:SetActive(false) this.needHero:SetActive(false) this.needBg:SetActive(true) this.replaceBg:SetActive(true) this.text:SetActive(true) this.cost:SetActive(false) - this.ShowCostInfo() - HeroManager.DeleteHeroDatas({curSelectHero.dynamicId}) - for i = 1, #msg.drop.Hero do HeroManager.UpdateHeroDatas(msg.drop.Hero[i]) ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id) end curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id) this.ShowCurrPosHeroReplace(curIndex) - - -- for i = 1, #heroDatas do - -- if heroSelectBtn[i] and heroDatas[i] then - -- heroSelectBtn[i]:SetActive(heroDatas[i].dynamicId == curSelectHero.dynamicId) - -- end - -- end - end) end) @@ -173,6 +156,8 @@ end --英雄类型按钮点击事件 function this.HeroReplaceBtnClick(_btn,_curIndex) curIndex = _curIndex + this.needBg:SetActive(true) + this.replaceBg:SetActive(true) this.SetBtnSelect(_btn) this.ShowCurrPosHeroReplace(_curIndex) end