Commit 533db86a845cd78a2b02f789f3fb212e9e7ce52c
1 parent
c59e058b
代理拾荒bug
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
src/actions/AdvAction.lua
| @@ -90,7 +90,7 @@ function _M.startAdvRpc( agent, data ) | @@ -90,7 +90,7 @@ function _M.startAdvRpc( agent, data ) | ||
| 90 | --上一个关卡结束才可以开始新的关卡 | 90 | --上一个关卡结束才可以开始新的关卡 |
| 91 | if role:getAdvData():isRunning() then return 8 end | 91 | if role:getAdvData():isRunning() then return 8 end |
| 92 | local advHang = role:getProperty("advHang") | 92 | local advHang = role:getProperty("advHang") |
| 93 | - if advHang[chapterId] then return 9 end --正在挂机 | 93 | + -- if advHang[chapterId] then return 9 end --正在挂机 |
| 94 | 94 | ||
| 95 | 95 | ||
| 96 | local chapterData = csvdb["adv_chapterCsv"][chapterId] | 96 | local chapterData = csvdb["adv_chapterCsv"][chapterId] |
| @@ -200,11 +200,12 @@ function _M.startHangRpc(agent, data) | @@ -200,11 +200,12 @@ function _M.startHangRpc(agent, data) | ||
| 200 | if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then | 200 | if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then |
| 201 | return 2 | 201 | return 2 |
| 202 | end | 202 | end |
| 203 | + adv_idle_time = adv_idle_time * 60 | ||
| 203 | 204 | ||
| 204 | local advHang = role:getProperty("advHang") | 205 | local advHang = role:getProperty("advHang") |
| 205 | if advHang[chapterId] then return 3 end --正在挂机 | 206 | if advHang[chapterId] then return 3 end --正在挂机 |
| 206 | 207 | ||
| 207 | - if role:getAdvData():isRunning() and role:getAdvData().chapterId == chapterId then return 4 end | 208 | + -- if role:getAdvData():isRunning() and role:getAdvData().chapterId == chapterId then return 4 end |
| 208 | 209 | ||
| 209 | if AdvCommon.isEndless(chapterId) then return 5 end -- 无尽没有代理 | 210 | if AdvCommon.isEndless(chapterId) then return 5 end -- 无尽没有代理 |
| 210 | 211 | ||
| @@ -282,12 +283,12 @@ function _M.quickHangRpc(agent, data) | @@ -282,12 +283,12 @@ function _M.quickHangRpc(agent, data) | ||
| 282 | if not adv_idle_time then | 283 | if not adv_idle_time then |
| 283 | return 2 | 284 | return 2 |
| 284 | end | 285 | end |
| 285 | - | 286 | + adv_idle_time = adv_idle_time * 60 |
| 286 | 287 | ||
| 287 | local reward, isFull | 288 | local reward, isFull |
| 288 | if skynet.timex() >= info.time then return end -- 已经完成了 | 289 | if skynet.timex() >= info.time then return end -- 已经完成了 |
| 289 | 290 | ||
| 290 | - local cost = math.ceil((info.time - skynet.timex()) / adv_idle_time * globalCsv.adv_idle_quicken) | 291 | + local cost = math.ceil((info.time - skynet.timex()) / 3600 * globalCsv.adv_idle_quicken) |
| 291 | 292 | ||
| 292 | if not role:checkItemEnough({[ItemId.Diamond] = cost}) then return end | 293 | if not role:checkItemEnough({[ItemId.Diamond] = cost}) then return end |
| 293 | role:costItems({[ItemId.Diamond] = cost}, {log = {desc = "advQuickHang", int1 = chapterId}}) | 294 | role:costItems({[ItemId.Diamond] = cost}, {log = {desc = "advQuickHang", int1 = chapterId}}) |
| @@ -324,6 +325,7 @@ function _M.endHangRpc(agent, data) | @@ -324,6 +325,7 @@ function _M.endHangRpc(agent, data) | ||
| 324 | if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then | 325 | if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then |
| 325 | return 2 | 326 | return 2 |
| 326 | end | 327 | end |
| 328 | + adv_idle_time = adv_idle_time * 60 | ||
| 327 | 329 | ||
| 328 | local reward, isFull, change | 330 | local reward, isFull, change |
| 329 | if skynet.timex() >= info.time then | 331 | if skynet.timex() >= info.time then |