Commit 1ce3adac1fd8ab05b09eabb8a54aa496b902c532
1 parent
8ec16c21
充值
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
src/actions/HangAction.lua
| ... | ... | @@ -516,7 +516,10 @@ local function bonusWinReward(role, bonusData, rewardType, count) |
| 516 | 516 | |
| 517 | 517 | if rewardType == 3 then |
| 518 | 518 | local open, actId = role.activity:isOpen("BonusDouble") |
| 519 | - local actData = csvdb["activity_ctrlCsv"][actId] | |
| 519 | + local actData | |
| 520 | + if open then | |
| 521 | + actData = csvdb["activity_ctrlCsv"][actId] | |
| 522 | + end | |
| 520 | 523 | |
| 521 | 524 | reward = bonusData.reward:toNumMap() |
| 522 | 525 | for itemId, c in pairs(reward) do |
| ... | ... | @@ -528,8 +531,10 @@ local function bonusWinReward(role, bonusData, rewardType, count) |
| 528 | 531 | reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] |
| 529 | 532 | end |
| 530 | 533 | end |
| 531 | - for k, v in pairs(reward) do | |
| 532 | - reward[k] = v * (actData.condition > 1 and actData.condition or 1) | |
| 534 | + if open and actData then | |
| 535 | + for k, v in pairs(reward) do | |
| 536 | + reward[k] = v * (actData.condition > 1 and actData.condition or 1) | |
| 537 | + end | |
| 533 | 538 | end |
| 534 | 539 | end |
| 535 | 540 | |
| ... | ... | @@ -604,7 +609,7 @@ function _M.endBonusBattleRpc(agent, data) |
| 604 | 609 | end |
| 605 | 610 | local bonusData = csvdb["bonus_battleCsv"][id] |
| 606 | 611 | |
| 607 | - local reward, change | |
| 612 | + local reward, change = {} | |
| 608 | 613 | |
| 609 | 614 | local bonusStar = role:getProperty("bonusStar") |
| 610 | 615 | local oldStar = bonusStar[id] or 0 | ... | ... |
src/models/RolePlugin.lua