在线四灵编队修改提交

dev_chengFeng
jiaoyangna 2021-09-18 18:55:07 +08:00
parent a628176640
commit 4e5ef30243
4 changed files with 15 additions and 1 deletions

View File

@ -60,6 +60,7 @@ GameEvent = {
OnResetFormationHp = "Formation.OnResetFormationHp",
-- 掉血消息
OnMapTeamHpReduce = "Formation.OnMapTeamHpReduce",
OnFormationChange1 = "OnFormationChange1",
},
Mission = {
--新增任务

View File

@ -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()

View File

@ -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()

View File

@ -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 = {}