无尽编队修改

dev_chengFeng
jiaoyangna 2021-05-25 21:27:38 +08:00
parent da6dd0283c
commit 82787b2331
5 changed files with 15 additions and 7 deletions

View File

@ -465,6 +465,7 @@ GameEvent = {
EndLess ={
MissonChange = "EndLess.MissonChange",
RechargeQinglongSerectSuccess = "EndLess.RechargeQinglongSerectSuccess",
RefreshHeroData = "EndLess.RefreshHeroData"
},
--山河社稷图
FightLevel={

View File

@ -577,10 +577,12 @@ function this.InitHeroHp(msg, func)
local heroData = msg.heroInfo[i]
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
local maxHp = allEquipAddProVal[3]
LogGreen("heroData.heroId:"..heroData.heroId.." heroData.hp:"..heroData.hp)
local hp = heroData.hp / 10000
local data = {}
data.percentHp = hp
data.curHp = math.ceil(hp * maxHp)
LogGreen("heroData.heroId:"..heroData.heroId.." data.curHp:"..data.curHp)
data.heroId = heroData.heroId
this.allHeroBlood[heroData.heroId] = data
end
@ -737,7 +739,7 @@ function this.GetRewardData()
this.SetRewardData()
local data = nil
for i = 1 ,#this.mission do
-- LogGreen("id:"..this.mission[i].Id.." state:"..this.mission[i].state)
LogGreen("id:"..this.mission[i].Id.." state:"..this.mission[i].state.." progress:"..this.mission[i].progress)
end
for i = 1 ,#this.mission do
if this.mission[i].state == 1 then

View File

@ -1002,7 +1002,7 @@ function this.GetMapTeamPower()
Log("heroData is not exist! error Did:" .. curFormation[i].heroId)
return
end
LogGreen(curFormation[i].heroId.." curFormation[i].allProVal[2]:" .. tostring(curFormation[i].allProVal[2]))
if curFormation[i].allProVal[2] > 0 then
local allEquipAddProVal = 0
allEquipAddProVal = HeroManager.CalculateHeroAllProValList(1, heroData.dynamicId, false)

View File

@ -253,6 +253,7 @@ function EndLessMapView:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.GetBagEnergy)
Game.GlobalEvent:AddEvent(GameEvent.Map.EnergyFull, EndLessMapManager.EndlessRedCheck)
Game.GlobalEvent:AddEvent(GameEvent.EndLess.MissonChange,this.RefreshTargetRoote)
Game.GlobalEvent:AddEvent(GameEvent.EndLess.RefreshHeroData,this.OnShow)
end
function EndLessMapView:RemoveListener()
@ -260,7 +261,7 @@ function EndLessMapView:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Map.OnRemoveNotePoint, this.SetNoteShow)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.GetBagEnergy)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.EnergyFull, EndLessMapManager.EndlessRedCheck)
Game.GlobalEvent:RemoveEvent(GameEvent.EndLess.MissonChange,this.RefreshTargetRoote)
Game.GlobalEvent:RemoveEvent(GameEvent.EndLess.RefreshHeroData,this.OnShow)
end
@ -320,7 +321,7 @@ function EndLessMapView:OnShow()
end
function EndLessMapView:ShowHeroData()
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ENDLESS_MAP)
local curFormation = EndLessMapManager.formation
if not this.heroList then
this.heroList = {}
end
@ -330,7 +331,7 @@ function EndLessMapView:ShowHeroData()
this.heroList[k].go.gameObject:SetActive(false)
end
end
for i, v in ipairs(curFormation.teamHeroInfos) do
for i, v in ipairs(curFormation) do
if not this.heroList[i] then
this.heroList[i] = {}
this.heroList[i].go = newObjToParent(this.selectPre,this.selectHeroGrid)
@ -360,8 +361,9 @@ function EndLessMapView:ShowHeroData()
end
end
function EndLessMapView:RefreshTargetRoote()
function EndLessMapView:RefreshTargetRoote()
this.curMission = EndLessMapManager.GetRewardData()
LogGreen("this.curMission.progress:"..this.curMission.progress)
if this.curMission.state == 0 then
this.TargetBtn1.gameObject:SetActive(false)
this.TargetBtn2.gameObject:SetActive(true)

View File

@ -324,7 +324,10 @@ local directFight = function(showType, eventId, showValues, options)
CarbonManager.InitQuickFightData(monsterGroupId, eventId, msg)
-- MapTrialManager.SetHeroHp(msg.remainHpList,MapTrialManager.selectHeroDid)
-- LogPink("战斗后Mapmanager中的编队长度"..#MapManager.formationList)
-- LogBlue("战斗后FormationManager中的编队长度"..#FormationManager.formationList)
-- LogBlue("战斗后FormationManager中的编队长度"..#FormationManager.formationList)\
NetManager.RequestAllHeroHp(function ()
Game.GlobalEvent:DispatchEvent(GameEvent.EndLess.RefreshHeroData)
end)
end)
else
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_DREAMLAND)