取消选择重新保存编队
parent
186fd78744
commit
d07d7da359
|
@ -91,6 +91,21 @@ function FourTrailSingleHelpHero:SetIcon1(heroData,player)
|
||||||
self.selectText.text = "取消选择"
|
self.selectText.text = "取消选择"
|
||||||
Util.AddOnceClick(self.btn, function()
|
Util.AddOnceClick(self.btn, function()
|
||||||
NetManager.UseHelpHeroRequest(heroData.dynamicId,self.curType,0,function()
|
NetManager.UseHelpHeroRequest(heroData.dynamicId,self.curType,0,function()
|
||||||
|
local curFormation = FormationManager.GetFormationByID(1700 + self.curType)
|
||||||
|
--上阵列表赋值
|
||||||
|
local choosedList ={}
|
||||||
|
for j = 1, #curFormation.teamHeroInfos do
|
||||||
|
local teamInfo = curFormation.teamHeroInfos[j]
|
||||||
|
-- 加空判断避免不知名错误
|
||||||
|
if teamInfo and teamInfo.heroId ~= heroData.dynamicId then
|
||||||
|
table.insert(choosedList, {heroId = teamInfo.heroId,position=teamInfo.position})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
FormationManager.RefreshFormation(
|
||||||
|
(1700 + self.curType),
|
||||||
|
choosedList,
|
||||||
|
FormationManager.formationList[(1700 + self.curType)].teamPokemonInfos
|
||||||
|
)
|
||||||
MonsterCampManager.SetFriendHelpHero(nil,self.curType)
|
MonsterCampManager.SetFriendHelpHero(nil,self.curType)
|
||||||
self:SetIcon1(heroData,player)
|
self:SetIcon1(heroData,player)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue