|
|
@@ -120,6 +120,17 @@ end
|
|
|
|
|
|
function onLogin(human,funcID)
|
|
|
taskActive(human, 1, funcID,1)
|
|
|
+
|
|
|
+ --特殊处理下活动没开前充值、完成了活跃度任务,任务开启后没玩法完成
|
|
|
+ local nowHuoYue = human.db.dailyTask.nowHuoYue
|
|
|
+ if nowHuoYue > 0 then
|
|
|
+ specailFunc(human, 2, funcID, nowHuoYue)
|
|
|
+ end
|
|
|
+
|
|
|
+ local topupAcountDaily = human.db.topupAcountDaily
|
|
|
+ if topupAcountDaily and topupAcountDaily > 0 then
|
|
|
+ specailFunc(human, 3, funcID, topupAcountDaily)
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
function onCharge(human,parameter,funcID)
|
|
|
@@ -134,6 +145,47 @@ function onZhanBuBuyCard(human, funcID, parameter)
|
|
|
taskActive(human, 4, funcID, parameter)
|
|
|
end
|
|
|
|
|
|
+--特殊处理下活动没开前充值、完成了活跃度任务,任务开启后没玩法完成
|
|
|
+function specailFunc(human, type, id, cnt)
|
|
|
+ local state, endTime, starTime = AbsActLogic.isStarted(human, id)
|
|
|
+ if not state then return end
|
|
|
+
|
|
|
+ local absConfig = AbsActExcel.absActivity[id]
|
|
|
+ if not absConfig then return end
|
|
|
+
|
|
|
+ AbsActLogic.checkAbsActClean(human, id)
|
|
|
+ local absAct = human.db.absAct[id]
|
|
|
+ if not absAct then
|
|
|
+ return
|
|
|
+ end
|
|
|
+ absAct.task = absAct.task or {}
|
|
|
+ local nowDay = Util.diffDay(starTime) + 1
|
|
|
+ local config = AbsActExcel.dailyFixedTask
|
|
|
+
|
|
|
+ local len = #config
|
|
|
+
|
|
|
+ for i = 1,len do
|
|
|
+ if config[i].day == nowDay and config[i].actId == absConfig.actId and type == config[i].type then
|
|
|
+ absAct.task[i] = absAct.task[i] or {}
|
|
|
+ absAct.task[i].cnt = absAct.task[i].cnt or 0
|
|
|
+ if absAct.task[i].state and absAct.task[i].cnt > 0 then --只处理一次
|
|
|
+ break
|
|
|
+ end
|
|
|
+ absAct.task[i].cnt = cnt
|
|
|
+ --absAct.task[i].cnt = absAct.task[i].cnt + cnt
|
|
|
+ if absAct.task[i].cnt >= config[i].needCnt then
|
|
|
+ absAct.task[i].state = 1
|
|
|
+ break
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ YunYingLogic.sendBanner(human)
|
|
|
+ YunYingLogic.updateIcon(YYInfo[id], human)
|
|
|
+ YunYingLogic.sendGroupUpdate(YYInfo[id], human, absConfig.panelID)
|
|
|
+end
|
|
|
+
|
|
|
+
|
|
|
-- 每日任务激活
|
|
|
function taskActive(human, type, id, cnt)
|
|
|
local state, endTime, starTime = AbsActLogic.isStarted(human, id)
|