【花虚坛】置换界面空白修复
parent
40bc700f65
commit
1c9ae3884b
|
@ -56,7 +56,6 @@ function this:BindEvent()
|
||||||
else
|
else
|
||||||
NetManager.SaveHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
NetManager.SaveHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
||||||
HeroManager.ResetHeroChangeId(curSelectHero.dynamicId,msg.heroTempId)--改变英雄changeId
|
HeroManager.ResetHeroChangeId(curSelectHero.dynamicId,msg.heroTempId)--改变英雄changeId
|
||||||
|
|
||||||
this.replaceHero:SetActive(true)
|
this.replaceHero:SetActive(true)
|
||||||
this.cancelBtn:SetActive(true)
|
this.cancelBtn:SetActive(true)
|
||||||
this.replaceBtn:SetActive(false)
|
this.replaceBtn:SetActive(false)
|
||||||
|
@ -65,9 +64,7 @@ function this:BindEvent()
|
||||||
this.replaceBg:SetActive(false)
|
this.replaceBg:SetActive(false)
|
||||||
this.text:SetActive(false)
|
this.text:SetActive(false)
|
||||||
this.cost:SetActive(false)
|
this.cost:SetActive(false)
|
||||||
|
|
||||||
this.ShowCostInfo()
|
this.ShowCostInfo()
|
||||||
|
|
||||||
local value = this.RebuildData(msg.heroTempId,curSelectHero)
|
local value = this.RebuildData(msg.heroTempId,curSelectHero)
|
||||||
this.SetHero(this.replaceHero,value)
|
this.SetHero(this.replaceHero,value)
|
||||||
end)
|
end)
|
||||||
|
@ -77,7 +74,6 @@ function this:BindEvent()
|
||||||
Util.AddClick(this.cancelBtn,function()
|
Util.AddClick(this.cancelBtn,function()
|
||||||
NetManager.CancelHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
NetManager.CancelHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
||||||
HeroManager.ResetHeroChangeId(curSelectHero.dynamicId)--改变英雄changeId
|
HeroManager.ResetHeroChangeId(curSelectHero.dynamicId)--改变英雄changeId
|
||||||
|
|
||||||
this.replaceHero:SetActive(false)
|
this.replaceHero:SetActive(false)
|
||||||
this.needHero:SetActive(true)
|
this.needHero:SetActive(true)
|
||||||
this.cancelBtn:SetActive(false)
|
this.cancelBtn:SetActive(false)
|
||||||
|
@ -87,39 +83,26 @@ function this:BindEvent()
|
||||||
this.replaceBg:SetActive(true)
|
this.replaceBg:SetActive(true)
|
||||||
this.text:SetActive(false)
|
this.text:SetActive(false)
|
||||||
this.cost:SetActive(true)
|
this.cost:SetActive(true)
|
||||||
|
|
||||||
this.ShowCostInfo()
|
this.ShowCostInfo()
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
--保存置换
|
--保存置换
|
||||||
Util.AddClick(this.saveBtn,function()
|
Util.AddClick(this.saveBtn,function()
|
||||||
NetManager.DoHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
NetManager.DoHeroChangeRequest(curSelectHero.dynamicId,function (msg)
|
||||||
|
|
||||||
this.replaceHero:SetActive(false)
|
this.replaceHero:SetActive(false)
|
||||||
this.needHero:SetActive(false)
|
this.needHero:SetActive(false)
|
||||||
this.needBg:SetActive(true)
|
this.needBg:SetActive(true)
|
||||||
this.replaceBg:SetActive(true)
|
this.replaceBg:SetActive(true)
|
||||||
this.text:SetActive(true)
|
this.text:SetActive(true)
|
||||||
this.cost:SetActive(false)
|
this.cost:SetActive(false)
|
||||||
|
|
||||||
this.ShowCostInfo()
|
this.ShowCostInfo()
|
||||||
|
|
||||||
HeroManager.DeleteHeroDatas({curSelectHero.dynamicId})
|
HeroManager.DeleteHeroDatas({curSelectHero.dynamicId})
|
||||||
|
|
||||||
for i = 1, #msg.drop.Hero do
|
for i = 1, #msg.drop.Hero do
|
||||||
HeroManager.UpdateHeroDatas(msg.drop.Hero[i])
|
HeroManager.UpdateHeroDatas(msg.drop.Hero[i])
|
||||||
ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id)
|
ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id)
|
||||||
end
|
end
|
||||||
curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id)
|
curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id)
|
||||||
this.ShowCurrPosHeroReplace(curIndex)
|
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)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -173,6 +156,8 @@ end
|
||||||
--英雄类型按钮点击事件
|
--英雄类型按钮点击事件
|
||||||
function this.HeroReplaceBtnClick(_btn,_curIndex)
|
function this.HeroReplaceBtnClick(_btn,_curIndex)
|
||||||
curIndex = _curIndex
|
curIndex = _curIndex
|
||||||
|
this.needBg:SetActive(true)
|
||||||
|
this.replaceBg:SetActive(true)
|
||||||
this.SetBtnSelect(_btn)
|
this.SetBtnSelect(_btn)
|
||||||
this.ShowCurrPosHeroReplace(_curIndex)
|
this.ShowCurrPosHeroReplace(_curIndex)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue