diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index 1c17338..c7b5ede 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -315,6 +315,7 @@ TriggerEventType = { LevelUp = 4, AddNewHero = 5, SSRCount = 6, + AfterTs = 7, -- 某时间以后 } DrawCardType = { diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 9cd52ca..2018e0d 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -738,7 +738,7 @@ function _M.drawHeroRpc(agent, data) if btype == 1 then -- 判断定向卡池活动开启 - if not role.activity:isOpen("SsrUpPoolChange") then + if not role.activity:isOpen("RaceDraw") then return end end diff --git a/src/csvdata b/src/csvdata index 0e38227..02a9bbb 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit 0e38227a4444f21a0a9c1a7911b5e2af79c8ed0a +Subproject commit 02a9bbbb10bb99a91cc5d67f62dc7e5b49d8cb46 diff --git a/src/models/Activity.lua b/src/models/Activity.lua index 6152ac2..0e5816c 100644 --- a/src/models/Activity.lua +++ b/src/models/Activity.lua @@ -18,7 +18,7 @@ Activity.ActivityType = { DrawHero = 12, --抽卡周 招募 AdvDraw = 13, --拾荒抽周 资助 OpenBox = 14, --拆解周 时钟箱 - --RaceDraw = 15, -- 定向招募活动 + RaceDraw = 16, -- 定向招募活动 } diff --git a/src/models/RoleTimeReset.lua b/src/models/RoleTimeReset.lua index d8361c2..52adbda 100644 --- a/src/models/RoleTimeReset.lua +++ b/src/models/RoleTimeReset.lua @@ -90,7 +90,7 @@ function Role:updateTimeReset(now, notify) self:setProperties({timeReset = timeReset, ltime = now}) response.timeReset = timeReset - response.ltime = ltime + response.ltime = now if notify then self:notifyUpdateProperties(response) diff --git a/src/models/Store.lua b/src/models/Store.lua index 05e8b02..0ad99a9 100644 --- a/src/models/Store.lua +++ b/src/models/Store.lua @@ -420,7 +420,35 @@ function Store:checkPaySignReward() end end +-- 临时用 登录触发限时礼包 时间点以后 +function Store:OnTriggerLimitTimePackAfterTs(eventType, param) + local limitPack = self:getProperty("limitTPack") + local timeNow = skynet.timex() + local config = nil + for id, cfg in pairs(csvdb["shop_packCsv"]) do + local ts = toUnixtime(""..cfg.condition) + if cfg.type == eventType and ts < param then + config = cfg + + if config ~= nil then + local rechargeCfg = csvdb["shop_rechargeCsv"][config.packId] + if rechargeCfg then + if not limitPack[rechargeCfg.id] then + limitPack[rechargeCfg.id] = {timeNow + rechargeCfg.time, config.id} + self.owner:log("push_gift", { + gift_id = rechargeCfg.id, --礼包ID + gift_name = rechargeCfg.title, --礼包名称 + }) + self:updateProperty({field = "limitTPack", value = limitPack, notNotify = false}) + end + end + end + end + end +end + function Store:data() + self:OnTriggerLimitTimePackAfterTs(TriggerEventType.AfterTs, skynet.timex()) return { buyR = self:getProperty("buyR"), payR = self:getProperty("payR"), -- libgit2 0.21.2