From 6cb971d4938bab71da80e8b6052cb2e456a52b38 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 6 Jun 2023 18:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97bi=E6=97=A5=E5=BF=97=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 21 ++++++++++++++++++- .../battle/controller/battle_controller.lua | 4 ++++ .../battle_controller_daily_challenge.lua | 2 +- .../controller/battle_controller_stage.lua | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 48dcd0b0..5a7baea0 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -401,7 +401,7 @@ function BIReport:postFightBegin(battleType, wave, chapterId, maxChapter, startT self:report(EVENT_NAME_FIGHT, args) end -function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, eliminateCount, chapterEliminateCount, type, deathType, startTimes, isFirstWin, isFianlStep) +function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, eliminateCount, chapterEliminateCount, type, deathType, startTimes, isFirstWin, isFianlStep, maxLinkCount) -- wave 进入关卡编号 -- LevelType 进入关卡类型 -- MaxLevel 已解锁最大关卡 @@ -435,6 +435,25 @@ function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, is_first_win = isFirstWin, isFianlStep = isFianlStep, } + if isFianlStep then + local famation_level = 0 + local formation = DataManager.FormationData:getStageFormation() + for matchType, heroId in pairs(formation) do + local entity = DataManager.HeroData:getHeroById(heroId) + if entity then + if args.fomation then + args.fomation = args.fomation .. "|" + else + args.fomation = GConst.EMPTY_STRING + end + args.fomation = args.fomation .. heroId .. ":" .. entity:getLv() + famation_level = famation_level + entity:getLv() + end + end + args.famation_level = famation_level + args.maxLinkCount = maxLinkCount + end + self:report(EVENT_NAME_FIGHT, args) end diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index f9bf5b89..a80e0eb5 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -259,6 +259,7 @@ function BattleController:init(params) self.totalDurationTime = 0 self.eliminateCount = 0 self.eliminateTotalCount = 0 + self.maxLinkCount = 0 self.realTime = 0 self.taskProgress = {} self.waveRoundCount = {} @@ -1018,6 +1019,9 @@ function BattleController:onLinkOver() self.eliminateCount = self.eliminateCount + 1 self.eliminateTotalCount = self.eliminateTotalCount + 1 + if count > self.maxLinkCount then + self.maxLinkCount = count + end end function BattleController:calculateCurElimination(onlyCheck) diff --git a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua index 26213ac7..c0051ace 100644 --- a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua +++ b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua @@ -264,7 +264,7 @@ function BattleControllerDailyChallenge:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerDailyChallenge:postFightStart() diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index fe9e04cf..f0f21360 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -229,7 +229,7 @@ function BattleControllerStage:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.STAGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.STAGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerStage:postFightStart()