bossrush阵容

This commit is contained in:
xiekaidong 2023-09-05 17:36:43 +08:00
parent 24a88cf05a
commit d7f60f5002

View File

@ -65,8 +65,17 @@ function ActBossRushData:init(data)
self.activity_id = data.activity_id self.activity_id = data.activity_id
-- 战斗 -- 战斗
if data.heroes then if data.heroes then
local update = false
for _, heroId in ipairs(data.heroes) do
if heroId > 0 then
update = true
break
end
end
if update then
DataManager.FormationData:initFormationByType(GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH, data.heroes) DataManager.FormationData:initFormationByType(GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH, data.heroes)
end end
end
self.todayFightCount = data.fight_count or 0 self.todayFightCount = data.fight_count or 0
self.fightCount = data.total_fight_count or 0 self.fightCount = data.total_fight_count or 0
self.todayMaxWave = data.max_wave or 0 self.todayMaxWave = data.max_wave or 0