竞技场日志上报

This commit is contained in:
xiekaidong 2023-07-06 18:08:53 +08:00
parent 8ee590a831
commit 0445086500
4 changed files with 22 additions and 7 deletions

View File

@ -162,7 +162,10 @@ BIReport.FIGHT_WAVE_END_TYPE = {
BIReport.BATTLE_TYPE = { BIReport.BATTLE_TYPE = {
["1"] = "Stage", ["1"] = "Stage",
["2"] = "DailyChallenge" ["2"] = "DailyChallenge",
["3"] = "DungeonGold",
["4"] = "DungeonShards",
["5"] = "Arena",
} }
BIReport.GIFT_TYPE = { BIReport.GIFT_TYPE = {

View File

@ -142,7 +142,7 @@ function ArenaManager:rspSettlement(result)
--bi上报 --bi上报
local winRate = result.total_win_count / (result.total_win_count + result.total_lose_count) local winRate = result.total_win_count / (result.total_win_count + result.total_lose_count)
BIReport:postArenaSettlement(DataManager.ArenaData:getGradingId(), reqData.battleReport.wave, winRate) BIReport:postArenaSettlement(DataManager.ArenaData:getGradingId(), reqData.battleReport.round, winRate)
end end
end end

View File

@ -117,7 +117,7 @@ function BattleControllerArena:postWaveOver(atkDead, isQuit)
local duration = self.waveDurationTime local duration = self.waveDurationTime
local totalTime = self.totalDurationTime local totalTime = self.totalDurationTime
local startTimes = 0 -- todo local startTimes = DataManager.ArenaData:getTotalFightCount()
local isFirstWin = false local isFirstWin = false
local isFianlStep = self.waveIndex >= self.maxWaveIndex local isFianlStep = self.waveIndex >= self.maxWaveIndex
@ -125,9 +125,8 @@ function BattleControllerArena:postWaveOver(atkDead, isQuit)
end end
function BattleControllerArena:postFightStart() function BattleControllerArena:postFightStart()
local gradingId = DataManager.ArenaData:getGradingId() local startTimes = DataManager.ArenaData:getTotalFightCount()
local startTimes = 0 -- todo BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.ARENA, self.waveIndex, self.chapterId, self.chapterId, startTimes)
BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.ARENA, self.waveIndex, self.chapterId, gradingId, startTimes)
end end
function BattleControllerArena:getAtkMinRow() function BattleControllerArena:getAtkMinRow()
@ -143,7 +142,6 @@ function BattleControllerArena:getInitBoard()
local config = self:getChapterConfig()[self.chapterId] local config = self:getChapterConfig()[self.chapterId]
local boardCfg = self:getBoardConfig() local boardCfg = self:getBoardConfig()
local boardId = config.rand_board[math.random(1, #config.rand_board)] local boardId = config.rand_board[math.random(1, #config.rand_board)]
boardId = 37
local cfg = boardCfg[boardId] local cfg = boardCfg[boardId]
if cfg then if cfg then
local board = GFunc.getTable(cfg.board) local board = GFunc.getTable(cfg.board)

View File

@ -27,6 +27,7 @@ function ArenaData:init(data)
self.todayAdRematchCount = data.today_ad_count-- 今日看广告跳匹配cd次数 self.todayAdRematchCount = data.today_ad_count-- 今日看广告跳匹配cd次数
self.todayWinAdBoxCount = data.ad_box_win_reward_count-- 今日胜利宝箱次数 self.todayWinAdBoxCount = data.ad_box_win_reward_count-- 今日胜利宝箱次数
self.todayLoseAdBoxCount = data.ad_box_lose_reward_count-- 今日失败宝箱次数 self.todayLoseAdBoxCount = data.ad_box_lose_reward_count-- 今日失败宝箱次数
self:updateTotalFightCount(data)
-- 初始化rank配置 -- 初始化rank配置
self.cfgRank = self:getRankCfg(self.season) self.cfgRank = self:getRankCfg(self.season)
-- 初始化time配置 -- 初始化time配置
@ -505,6 +506,19 @@ function ArenaData:onBattleResultReceived(settlement)
self:setDirty() self:setDirty()
end end
function ArenaData:updateTotalFightCount(data)
Logger.logHighlight("updateTotalFightCount")
Logger.logHighlight(data.total_win_count)
Logger.logHighlight(data.total_lose_count)
self.totalWinCount = data.total_win_count or 0 -- 总胜利次数
self.totalLoseCount = data.total_lose_count or 0 -- 总失败次数
self.totalFightCount = self.totalWinCount + self.totalLoseCount
end
function ArenaData:getTotalFightCount()
return self.totalFightCount or 0
end
-- 已领取上赛季奖励 -- 已领取上赛季奖励
function ArenaData:onLastSeasonRewardReceived() function ArenaData:onLastSeasonRewardReceived()
self.seasonRewardGot = self.season - 1 self.seasonRewardGot = self.season - 1