在线四灵编队修改提交
parent
a628176640
commit
4e5ef30243
|
|
@ -60,6 +60,7 @@ GameEvent = {
|
|||
OnResetFormationHp = "Formation.OnResetFormationHp",
|
||||
-- 掉血消息
|
||||
OnMapTeamHpReduce = "Formation.OnMapTeamHpReduce",
|
||||
OnFormationChange1 = "OnFormationChange1",
|
||||
},
|
||||
Mission = {
|
||||
--新增任务
|
||||
|
|
|
|||
|
|
@ -196,10 +196,12 @@ end
|
|||
|
||||
function this:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange, this.RefreshPower)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationChange1, this.RefreshPower)
|
||||
end
|
||||
|
||||
function this:OnSortingOrderChange()
|
||||
|
|
|
|||
|
|
@ -93,10 +93,20 @@ function this.On_Btn2_Click()
|
|||
if LengthOfTable(this.root.choosedList) < 1 then
|
||||
PopupTipPanel.ShowTip("挑战编队为空")
|
||||
return
|
||||
end
|
||||
local newteam = {}
|
||||
for i = 1,#this.root.choosedList do
|
||||
if HeroManager.GetSingleHeroData(this.root.choosedList[i].heroId) then
|
||||
table.insert(newteam, this.root.choosedList[i])
|
||||
end
|
||||
end
|
||||
if #newteam < 1 then
|
||||
PopupTipPanel.ShowTip("挑战编队为空")
|
||||
return
|
||||
end
|
||||
FormationManager.RefreshFormation(
|
||||
this.root.curFormationIndex,
|
||||
this.root.choosedList,
|
||||
newteam,
|
||||
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos
|
||||
)
|
||||
this.StartFight()
|
||||
|
|
|
|||
|
|
@ -509,6 +509,7 @@ function this.SetFriendHelpHero(helpFightList,trailType)
|
|||
local allAddProVal = HeroManager.CalculateHeroAllProValList(1, this.friendHelpHero[v.trailType].hero, false)
|
||||
this.friendHelpHero[v.trailType].hero.warPower = allAddProVal[HeroProType.WarPower]
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange1)
|
||||
else
|
||||
if not this.friendHelpHero then
|
||||
this.friendHelpHero = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue