Commit 4d0f1626735a63ee7294d6271350228a05464a4b
Merge branch 'tr/bugfix' of 120.26.43.151:wasteland/server into tr/bugfix
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
src/actions/ActivityAction.lua
... | ... | @@ -1304,7 +1304,7 @@ function _M.newSignRpc(agent, data) |
1304 | 1304 | if not open then return 1 end |
1305 | 1305 | |
1306 | 1306 | local actData = role.activity:getActData("NewSign") |
1307 | - if actData[actData["0"] or 0] then | |
1307 | + if actData[tostring(actData["0"] or 0)] then | |
1308 | 1308 | return 2 |
1309 | 1309 | end |
1310 | 1310 | ... | ... |
src/models/Activity.lua
... | ... | @@ -1097,9 +1097,11 @@ activityFunc[Activity.ActivityType.NewSign] = { |
1097 | 1097 | -- end, |
1098 | 1098 | ["crossDay"] = function(self, actType, notify) |
1099 | 1099 | local curData = self:getActData(actType) |
1100 | - curData["0"] = (curData["0"] or 0) + 1 | |
1101 | - local actData = csvdb["activity_signInCsv"][48] or {} | |
1102 | - if curData["0"] > #actData then return end -- 满了就忽略了 | |
1100 | + local isOpen, actId = self:isOpen(actType) | |
1101 | + local actData = csvdb["activity_signInCsv"][actId] or {} | |
1102 | + curData["0"] = curData["0"] or 0 | |
1103 | + if curData["0"] >= #actData then return end -- 满了就忽略了 | |
1104 | + curData["0"] = curData["0"] + 1 | |
1103 | 1105 | |
1104 | 1106 | -- 没满更新一下 |
1105 | 1107 | self:updateActData(actType, curData, not notify) | ... | ... |