Commit 6662e7d263415436fa28710d2e49929b41b74d6e
1 parent
b8d77233
掉落活动配置最大掉落周期数
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -375,6 +375,8 @@ function _M.hangDropRpc(agent, data) | @@ -375,6 +375,8 @@ function _M.hangDropRpc(agent, data) | ||
375 | local msg = MsgPack.unpack(data) | 375 | local msg = MsgPack.unpack(data) |
376 | local actid = msg.actid | 376 | local actid = msg.actid |
377 | if not role.activity:isOpenById(actid, "HangDrop") then return 1 end | 377 | if not role.activity:isOpenById(actid, "HangDrop") then return 1 end |
378 | + local actCtrlData = csvdb["activity_ctrlCsv"][actid] | ||
379 | + if not actCtrlData then return end | ||
378 | 380 | ||
379 | local actCfg = csvdb["activity_putCsv"][actid] | 381 | local actCfg = csvdb["activity_putCsv"][actid] |
380 | if not actCfg then return 2 end | 382 | if not actCfg then return 2 end |
@@ -407,7 +409,7 @@ function _M.hangDropRpc(agent, data) | @@ -407,7 +409,7 @@ function _M.hangDropRpc(agent, data) | ||
407 | return 4 | 409 | return 4 |
408 | end | 410 | end |
409 | local num = math.floor((timeNow - actData)/ period) | 411 | local num = math.floor((timeNow - actData)/ period) |
410 | - num = num > 8 and 8 or num | 412 | + num = num > actCtrlData.condition and actCtrlData.condition or num |
411 | if num == 0 then | 413 | if num == 0 then |
412 | return 5 | 414 | return 5 |
413 | end | 415 | end |