From 0beaf804a9d15d9a181b93ea3d4d3ef4c817c344 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 10 Jul 2023 17:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B1=9E=E6=80=A7=E4=B8=BB?= =?UTF-8?q?=E7=BA=BF=E9=98=B5=E5=AE=B9=E4=B8=8A=E6=8A=A5=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D=EF=BC=8C=E7=AB=9E=E6=8A=80?= =?UTF-8?q?=E5=9C=BA=E6=B6=88=E8=80=97=E4=B8=8A=E6=8A=A5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=AE=B5=E4=BD=8Did=EF=BC=8C=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E4=B8=8A=E6=8A=A5=E5=A2=9E=E5=8A=A0=E8=83=9C?= =?UTF-8?q?=E8=B4=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 6 ++++-- lua/app/module/arena/arena_manager.lua | 4 ++-- lua/app/userdata/formation/formation_data.lua | 2 ++ lua/app/userdata/hero/hero_entity.lua | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 820817ff..8f66ffcc 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -1048,21 +1048,23 @@ function BIReport:postAppLovinAdRevenue(msg) end -- 竞技场进入消耗上报 -function BIReport:postArenaConsume(todayConsume) +function BIReport:postArenaConsume(gradingId, todayConsume) local args = { event_type = BIReport.ARENA_OPT_TYPE.CONSUME, + grading_id = gradingId, today_consume = todayConsume, } self:report(EVENT_NAME_ARENA_OPT, args) end -- 竞技场结算数据上报 -function BIReport:postArenaSettlement(gradingId, round, winRate) +function BIReport:postArenaSettlement(gradingId, round, winRate, win) local args = { event_type = BIReport.ARENA_OPT_TYPE.SETTLEMENT, grading_id = gradingId, round = round, win_rate = winRate, + win = win, } self:report(EVENT_NAME_ARENA_OPT, args) end diff --git a/lua/app/module/arena/arena_manager.lua b/lua/app/module/arena/arena_manager.lua index c251b19e..7021b839 100644 --- a/lua/app/module/arena/arena_manager.lua +++ b/lua/app/module/arena/arena_manager.lua @@ -107,7 +107,7 @@ function ArenaManager:rspChallenge(result) --bi上报 LocalData:recordTodayArenaBattle() - BIReport:postArenaConsume(LocalData:getTodayArenaBattleCount()) + BIReport:postArenaConsume(DataManager.ArenaData:getGradingId(), LocalData:getTodayArenaBattleCount()) end end @@ -142,7 +142,7 @@ function ArenaManager:rspSettlement(result) --bi上报 local winRate = result.total_win_count / (result.total_win_count + result.total_lose_count) - BIReport:postArenaSettlement(DataManager.ArenaData:getGradingId(), reqData.battleReport.round, winRate) + BIReport:postArenaSettlement(DataManager.ArenaData:getGradingId(), reqData.battleReport.round, winRate, result.settlement.win) end end diff --git a/lua/app/userdata/formation/formation_data.lua b/lua/app/userdata/formation/formation_data.lua index 076fed1d..4125bdb4 100644 --- a/lua/app/userdata/formation/formation_data.lua +++ b/lua/app/userdata/formation/formation_data.lua @@ -134,6 +134,8 @@ function FormationData:getStageFormationBIStr() allHp = allHp + entity:getHp() end end + allAtk = allAtk // GConst.BattleConst.DEFAULT_FACTOR + allHp = allHp // GConst.BattleConst.DEFAULT_FACTOR return str, totalLevel, allAtk, allHp end diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index 1176378c..6bcd2eea 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -134,7 +134,8 @@ function HeroEntity:getAttrValue(name) end function HeroEntity:getAtk() - return self:getAttrValue(GConst.BattleConst.ATTR_NAME.ATK) + local atkName = GConst.MATCH_ATTACK_NAME[self:getMatchType()] + return self:getAttrValue(atkName) end function HeroEntity:getHp()