战斗bi日志上报

This commit is contained in:
xiekaidong 2023-06-06 18:06:38 +08:00
parent e69b7a14e5
commit 6cb971d493
4 changed files with 26 additions and 3 deletions

View File

@ -401,7 +401,7 @@ function BIReport:postFightBegin(battleType, wave, chapterId, maxChapter, startT
self:report(EVENT_NAME_FIGHT, args) self:report(EVENT_NAME_FIGHT, args)
end 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 进入关卡编号 -- wave 进入关卡编号
-- LevelType 进入关卡类型 -- LevelType 进入关卡类型
-- MaxLevel 已解锁最大关卡 -- MaxLevel 已解锁最大关卡
@ -435,6 +435,25 @@ function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime,
is_first_win = isFirstWin, is_first_win = isFirstWin,
isFianlStep = isFianlStep, 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) self:report(EVENT_NAME_FIGHT, args)
end end

View File

@ -259,6 +259,7 @@ function BattleController:init(params)
self.totalDurationTime = 0 self.totalDurationTime = 0
self.eliminateCount = 0 self.eliminateCount = 0
self.eliminateTotalCount = 0 self.eliminateTotalCount = 0
self.maxLinkCount = 0
self.realTime = 0 self.realTime = 0
self.taskProgress = {} self.taskProgress = {}
self.waveRoundCount = {} self.waveRoundCount = {}
@ -1018,6 +1019,9 @@ function BattleController:onLinkOver()
self.eliminateCount = self.eliminateCount + 1 self.eliminateCount = self.eliminateCount + 1
self.eliminateTotalCount = self.eliminateTotalCount + 1 self.eliminateTotalCount = self.eliminateTotalCount + 1
if count > self.maxLinkCount then
self.maxLinkCount = count
end
end end
function BattleController:calculateCurElimination(onlyCheck) function BattleController:calculateCurElimination(onlyCheck)

View File

@ -264,7 +264,7 @@ function BattleControllerDailyChallenge:postWaveOver(atkDead, isQuit)
local isFianlStep = self.waveIndex >= self.maxWaveIndex 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 end
function BattleControllerDailyChallenge:postFightStart() function BattleControllerDailyChallenge:postFightStart()

View File

@ -229,7 +229,7 @@ function BattleControllerStage:postWaveOver(atkDead, isQuit)
local isFianlStep = self.waveIndex >= self.maxWaveIndex 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 end
function BattleControllerStage:postFightStart() function BattleControllerStage:postFightStart()