diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 98aa64f8..caf21e7d 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -220,15 +220,6 @@ BIReport.ITEM_GET_TYPE = { FIRST_RECHARGE = "first_recharge", -- 特权卡 PRIVILEGE_CARD = "privilege_card", - - -- 七日乐 - ACT_SEVEN_DAY_SIGN = "seven_day_sign", - SEVEN_DAY_RESIGN = "seven_day_resign", - SEVEN_DAY_TASK = "seven_day_task", - SEVEN_DAY_TASK_2 = "seven_day_task_2", - SEVEN_DAY_SCORE = "seven_day_score", - SEVEN_DAY_SCORE_2 = "seven_day_score_2", - SEVEN_DAY_GIFT = "seven_day_gift", } BIReport.ADS_CLICK_TYPE = { @@ -480,10 +471,6 @@ local EVENT_ACT_OPT = "client_act_opt" local EVENT_NAME_RUNES = "client_runes" local EVENT_NAME_PAY_ORDER_REPEAT = "client_pay_order_repeat" local EVENT_NAME_VIDEO_AD_OPT = "client_ad_opt" -local EVENT_NAME_SEVEN_DAY_OPT = "client_seven_day_opt" -- 七天乐任务 -local EVENT_NAME_SEVEN_DAY_GIFT_OPT = "client_seven_day_gift_opt" -- 七天乐礼包 -local EVENT_NAME_SEVEN_DAY_LOOP_OPT = "client_seven_day_loop_opt" -- 循环七天乐任务 -local EVENT_NAME_SEVEN_DAY_LOOP_GIFT_OPT = "client_seven_day_loop_gift_opt" -- 循环七天乐任务 BIReport.TASK_OPT = { TASK_REWARD = "TaskReward", @@ -2116,60 +2103,4 @@ function BIReport:postVideoAdOpt(optType, adName, result) self:report(EVENT_NAME_VIDEO_AD_OPT, args) end -function BIReport:postSevenDayTask(optType, ids, rewards, period) - local idsStr = "" - if ids then - for i, id in ipairs(ids) do - idsStr = idsStr .. id .. ";" - end - end - local args = { - opt_type = optType, - period = period, - ids = idsStr, - reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, - task_score = DataManager.ActSevenDayData:getScore(period), - } - self:report(EVENT_NAME_SEVEN_DAY_OPT, args) -end - -function BIReport:postSevenDayGift(optType, id, giftType, rewards, dayn) - local args = { - opt_type = optType, - id = id, - type = giftType, - reward_str = rewards, - dayn = dayn, - } - self:report(EVENT_NAME_SEVEN_DAY_GIFT_OPT, args) -end - -function BIReport:postSevenDayLoopTask(optType, ids, rewards, taskScore, actId) - local idsStr = "" - if ids then - for i, id in ipairs(ids) do - idsStr = idsStr .. id .. ";" - end - end - local args = { - act_id = actId, - opt_type = optType, - ids = idsStr, - reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, - task_score = taskScore, - } - self:report(EVENT_NAME_SEVEN_DAY_LOOP_OPT, args) -end - -function BIReport:postSevenDayLoopGift(optType, id, giftType, rewards, dayn) - local args = { - opt_type = optType, - id = id, - type = giftType, - reward_str = rewards, - dayn = dayn, - } - self:report(EVENT_NAME_SEVEN_DAY_LOOP_GIFT_OPT, args) -end - return BIReport \ No newline at end of file diff --git a/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua index 1c0b8f21..2bc82fbe 100755 --- a/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua +++ b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua @@ -19,7 +19,8 @@ function ActSevenDayManager:onGetRewardTask(id, period) id = nil local itemGetType = period == 1 and BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK or BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK_2 - self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDaysTaskReq, {id = id, period = period}, self.onGetRewardTaskSuccess, itemGetType) + -- self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayTaskRewardReq, {id = id, period = period}, self.onGetRewardTaskSuccess, itemGetType) + self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayTaskRewardReq, {id = id}, self.onGetRewardTaskSuccess, itemGetType) end function ActSevenDayManager:onGetRewardTaskSuccess(result) @@ -49,7 +50,8 @@ function ActSevenDayManager:onGetRewardScore(id, period) id = nil local itemGetType = period == 1 and BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE or BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE_2 - self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDaysScoreRewardReq, {id = id, period = period}, self.onGetRewardScoreSuccess, itemGetType) + -- self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayRewardReq, {id = id, period = period}, self.onGetRewardScoreSuccess, itemGetType) + self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayRewardReq, {id = id}, self.onGetRewardScoreSuccess, itemGetType) end function ActSevenDayManager:onGetRewardScoreSuccess(result) @@ -72,4 +74,81 @@ function ActSevenDayManager:onGiftBuy(giftId) PayManager:purchasePackage(giftId, PayManager.PURCHARSE_TYPE.ACT_GIFT, true) end +--region 上报 +BIReport.SEVEN_DAY_OPT = { + TASK_REWARD = "TaskReward", + SCORE_REWARD = "ScoreReward", +} + +-- 七日乐 +BIReport.ITEM_GET_TYPE.ACT_SEVEN_DAY_SIGN = "seven_day_sign" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_RESIGN = "seven_day_resign" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK = "seven_day_task" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK_2 = "seven_day_task_2" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE = "seven_day_score" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE_2 = "seven_day_score_2" +BIReport.ITEM_GET_TYPE.SEVEN_DAY_GIFT = "seven_day_gift" + +local EVENT_NAME_SEVEN_DAY_OPT = "client_seven_day_opt" -- 七天乐任务 +local EVENT_NAME_SEVEN_DAY_GIFT_OPT = "client_seven_day_gift_opt" -- 七天乐礼包 +local EVENT_NAME_SEVEN_DAY_LOOP_OPT = "client_seven_day_loop_opt" -- 循环七天乐任务 +local EVENT_NAME_SEVEN_DAY_LOOP_GIFT_OPT = "client_seven_day_loop_gift_opt" -- 循环七天乐任务 + +function BIReport:postSevenDayTask(optType, ids, rewards, period) + local idsStr = "" + if ids then + for i, id in ipairs(ids) do + idsStr = idsStr .. id .. ";" + end + end + local args = { + opt_type = optType, + period = period, + ids = idsStr, + reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, + task_score = DataManager.ActSevenDayData:getScore(period), + } + self:report(EVENT_NAME_SEVEN_DAY_OPT, args) +end + +function BIReport:postSevenDayGift(optType, id, giftType, rewards, dayn) + local args = { + opt_type = optType, + id = id, + type = giftType, + reward_str = rewards, + dayn = dayn, + } + self:report(EVENT_NAME_SEVEN_DAY_GIFT_OPT, args) +end + +function BIReport:postSevenDayLoopTask(optType, ids, rewards, taskScore, actId) + local idsStr = "" + if ids then + for i, id in ipairs(ids) do + idsStr = idsStr .. id .. ";" + end + end + local args = { + act_id = actId, + opt_type = optType, + ids = idsStr, + reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, + task_score = taskScore, + } + self:report(EVENT_NAME_SEVEN_DAY_LOOP_OPT, args) +end + +function BIReport:postSevenDayLoopGift(optType, id, giftType, rewards, dayn) + local args = { + opt_type = optType, + id = id, + type = giftType, + reward_str = rewards, + dayn = dayn, + } + self:report(EVENT_NAME_SEVEN_DAY_LOOP_GIFT_OPT, args) +end + +--endregion return ActSevenDayManager \ No newline at end of file diff --git a/lua/app/module/item/item_const.lua b/lua/app/module/item/item_const.lua index 52b17924..a8311260 100644 --- a/lua/app/module/item/item_const.lua +++ b/lua/app/module/item/item_const.lua @@ -18,6 +18,8 @@ ItemConst.ITEM_ID_BOX_LV_5 = 18 ItemConst.ITEM_ID_RANDOM_FRAGMENT = 19 ItemConst.ITEM_ID_ARENA_BOUNTY_EXP = 21 ItemConst.ITEM_ID_ARENA_TICKET = 8 +ItemConst.ITEM_ID_SEVEN_DAY_SCORE = 45 -- 七天乐积分 +ItemConst.ITEM_ID_SEVEN_DAY_SCORE_2 = 45 -- 七天乐积分 ItemConst.ITEM_ID_FOURTEEN_DAY_EXCHANGE = 51 ItemConst.ITEM_ID_BOSS_RUSH = 52 ItemConst.ITEM_ID_GLOD_WING = 49 diff --git a/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua b/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua index 10f4d033..cbc2daa7 100755 --- a/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua +++ b/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua @@ -225,6 +225,7 @@ function ActSevenDayData:getTaskData(taskId) self.taskData[taskId] = {progress = 0, claimed = 0} end + self.taskData[taskId].collect = (self.taskData[taskId].claimed or 0) == 1 return self.taskData[taskId] end