Commit c7c13501d16dd15426d6afdb337411380685ee47
Merge branch 'cn/develop' into cn/publish/release
Showing
3 changed files
with
14 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
... | ... | @@ -498,12 +498,17 @@ function Store:onBuyCard(type, duration, id, actid) |
498 | 498 | info["flag"] = 1 |
499 | 499 | bpInfo[index] = info |
500 | 500 | self:updateProperty({field = "bpInfo", value = bpInfo}) |
501 | + return {} | |
501 | 502 | elseif type == CardType.ActBattleCommandCard then |
502 | 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")) | |
503 | 505 | return nil |
504 | 506 | end |
505 | 507 | local actCfg = csvdb["activity_ctrlCsv"][actid] |
506 | - 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 | |
507 | 512 | local actData = self.owner.activity:getActData("BattleCommand") or {} |
508 | 513 | actData["unlock"] = 1 |
509 | 514 | if actCfg.condition ~= 0 then | ... | ... |