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