Commit 39aebe0be7470c8b1c87d5b8cd8e0b068ccce18b
1 parent
c160a876
回归者活动,计算所有任务完成存在bug
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
src/actions/ActivityAction.lua
... | ... | @@ -1391,6 +1391,9 @@ function _M.returnerTaskRpc(agent, data) |
1391 | 1391 | local status = returner.status or {} |
1392 | 1392 | if status[taskId] then return 3 end |
1393 | 1393 | |
1394 | + status[taskId] = 1 | |
1395 | + returner.status = status | |
1396 | + | |
1394 | 1397 | local done = true |
1395 | 1398 | for _, data in pairs(TaskCsv) do |
1396 | 1399 | if not status[data.id] then |
... | ... | @@ -1399,15 +1402,12 @@ function _M.returnerTaskRpc(agent, data) |
1399 | 1402 | end |
1400 | 1403 | end |
1401 | 1404 | |
1402 | - status[taskId] = 1 | |
1403 | - returner.status = status | |
1404 | - | |
1405 | - local reward, change = role:award(taskData.reward, {log = {desc = "returner", int1 = taskData.day, int2 = taskId}}) | |
1406 | - | |
1407 | 1405 | if done then |
1408 | 1406 | returner = {} |
1409 | 1407 | end |
1410 | 1408 | |
1409 | + local reward, change = role:award(taskData.reward, {log = {desc = "returner", int1 = taskData.day, int2 = taskId}}) | |
1410 | + | |
1411 | 1411 | local pack = globalCsv.returner_pack:toArray(true,"=") |
1412 | 1412 | if pack[1] == taskData.id then |
1413 | 1413 | role:checkTaskEnter("Appoint", {id = pack[2]}) | ... | ... |