七天乐
This commit is contained in:
parent
920aa71690
commit
7b7258fc8c
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user