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
src/models/RoleTimeReset.lua
| ... | ... | @@ -68,6 +68,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) |
| 68 | 68 | response.dTask = {} |
| 69 | 69 | response.advSup = self:getProperty("advSup") |
| 70 | 70 | self:log("onLogin") |
| 71 | + | |
| 71 | 72 | end |
| 72 | 73 | |
| 73 | 74 | ResetFunc["CrossWeek"] = function(self, notify, response) |
| ... | ... | @@ -151,6 +152,13 @@ function Role:updateTimeReset(now, notify) |
| 151 | 152 | if notify then |
| 152 | 153 | self:notifyUpdateProperties(response) |
| 153 | 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 | 162 | return resetMode |
| 155 | 163 | end |
| 156 | 164 | ... | ... |
src/models/Store.lua
| ... | ... | @@ -501,10 +501,14 @@ function Store:onBuyCard(type, duration, id, actid) |
| 501 | 501 | return {} |
| 502 | 502 | elseif type == CardType.ActBattleCommandCard then |
| 503 | 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 | 505 | return nil |
| 505 | 506 | end |
| 506 | 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 | 512 | local actData = self.owner.activity:getActData("BattleCommand") or {} |
| 509 | 513 | actData["unlock"] = 1 |
| 510 | 514 | if actCfg.condition ~= 0 then | ... | ... |