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