Commit f370db2b50783bf1856032bb7f64bf36eff0a46a
Merge branch 'cn/develop' into cn/publish/preview
Showing
3 changed files
with
13 additions
and
2 deletions
Show diff stats
src/actions/RoleAction.lua
@@ -173,7 +173,6 @@ function _M.loginRpc( agent, data ) | @@ -173,7 +173,6 @@ function _M.loginRpc( agent, data ) | ||
173 | role.activity:checkActivityStatus(now, false, false) | 173 | role.activity:checkActivityStatus(now, false, false) |
174 | role:log("onLogin") | 174 | role:log("onLogin") |
175 | end | 175 | end |
176 | - role:checkTaskEnter("Login", {}) | ||
177 | 176 | ||
178 | redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) | 177 | redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) |
179 | 178 |
src/models/RoleTimeReset.lua
@@ -68,6 +68,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | @@ -68,6 +68,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | ||
68 | response.dTask = {} | 68 | response.dTask = {} |
69 | response.advSup = self:getProperty("advSup") | 69 | response.advSup = self:getProperty("advSup") |
70 | self:log("onLogin") | 70 | self:log("onLogin") |
71 | + | ||
71 | end | 72 | end |
72 | 73 | ||
73 | ResetFunc["CrossWeek"] = function(self, notify, response) | 74 | ResetFunc["CrossWeek"] = function(self, notify, response) |
@@ -151,6 +152,13 @@ function Role:updateTimeReset(now, notify) | @@ -151,6 +152,13 @@ function Role:updateTimeReset(now, notify) | ||
151 | if notify then | 152 | if notify then |
152 | self:notifyUpdateProperties(response) | 153 | self:notifyUpdateProperties(response) |
153 | end | 154 | end |
155 | + | ||
156 | + -- 1. 如果放到CrossDay中,新号创建会触发CrossWeek,会清空 bcTask字段 | ||
157 | + -- 2. 如果CrossDay跟CrossWeek互换调用顺序,则会导致周任务不重置。 | ||
158 | + -- 3. 放到这里虽然不好看,但是没办法。只能放这了。 | ||
159 | + if resetMode and resetMode["CrossDay"] then -- 跨天 | ||
160 | + self:checkTaskEnter("Login", {}) | ||
161 | + end | ||
154 | return resetMode | 162 | return resetMode |
155 | end | 163 | end |
156 | 164 |
src/models/Store.lua
@@ -501,10 +501,14 @@ function Store:onBuyCard(type, duration, id, actid) | @@ -501,10 +501,14 @@ function Store:onBuyCard(type, duration, id, actid) | ||
501 | return {} | 501 | return {} |
502 | elseif type == CardType.ActBattleCommandCard then | 502 | elseif type == CardType.ActBattleCommandCard then |
503 | if not self.owner.activity:isOpenById(actid, "ActShopGoods") then | 503 | if not self.owner.activity:isOpenById(actid, "ActShopGoods") then |
504 | + skynet.error("not open, actid: " .. (actid or 0) .. "; id: " .. (id or 0) .. "; roleId: " .. self.owner:getProperty("id")) | ||
504 | return nil | 505 | return nil |
505 | end | 506 | end |
506 | local actCfg = csvdb["activity_ctrlCsv"][actid] | 507 | local actCfg = csvdb["activity_ctrlCsv"][actid] |
507 | - if not actCfg then return end | 508 | + if not actCfg then |
509 | + skynet.error("actCfg is nil, actid: " .. (actid or 0) .. "; id: " .. (id or 0) .. "; roleId: " .. self.owner:getProperty("id")) | ||
510 | + return nil | ||
511 | + end | ||
508 | local actData = self.owner.activity:getActData("BattleCommand") or {} | 512 | local actData = self.owner.activity:getActData("BattleCommand") or {} |
509 | actData["unlock"] = 1 | 513 | actData["unlock"] = 1 |
510 | if actCfg.condition ~= 0 then | 514 | if actCfg.condition ~= 0 then |