From 3ccfaec8d0ff0c4dcca75a34c494fbde4cc486e7 Mon Sep 17 00:00:00 2001 From: chenxi Date: Tue, 6 Jun 2023 18:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 14 ++++++++++++++ lua/app/module/bounty/bounty_manager.lua | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 1f8b6333..af3af358 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -162,6 +162,7 @@ BIReport.MAIL_OPT_TYPE = { BIReport.BOUNTY_OPT_TYPE = { BOUNTY_LEVEL_UP = "BountyLevelUp", + BOUNTY_REWARD = "BountyReward", } BIReport.HERO_OPT_TYPE = { @@ -919,4 +920,17 @@ function BIReport:postBountyLevelUp(bountyType, level, exp, season) self:report(EVENT_NAME_BOUNTY_OPT, args) end +function BIReport:postBountyReward(bountyType, level, exp, season, rewardLevelId, isPro) + local args = { + event_type = BIReport.BOUNTY_OPT_TYPE.BOUNTY_REWARD, + season = season, + level = level, + exp = exp, + bounty_type = bountyType, + level_id = rewardLevelId, + is_pro = isPro, + } + self:report(EVENT_NAME_BOUNTY_OPT, args) +end + return BIReport \ No newline at end of file diff --git a/lua/app/module/bounty/bounty_manager.lua b/lua/app/module/bounty/bounty_manager.lua index d04ecf86..8e49aa06 100644 --- a/lua/app/module/bounty/bounty_manager.lua +++ b/lua/app/module/bounty/bounty_manager.lua @@ -45,11 +45,13 @@ function BountyManager:onClaimReward(result) end end if result.reqData.is_pro ~= nil then + local BountyData = DataManager.BountyData if result.reqData.is_pro then - DataManager.BountyData:onClaimProReward(result.reqData.level) + BountyData:onClaimProReward(result.reqData.level) else - DataManager.BountyData:onClaimReward(result.reqData.level) + BountyData:onClaimReward(result.reqData.level) end + BIReport:postBountyReward(BountyData:getBountyReportType(), BountyData:getLevel(), BountyData:getExp(), BountyData:getSeason(), result.reqData.level, result.reqData.is_pro) end end end