Commit 5de5479ee7536d3105eb492e10ff310e101ff52a
1 parent
28b0c285
工作日玩法奖励结算bug修复
Showing
1 changed file
with
10 additions
and
17 deletions
Show diff stats
src/actions/HangAction.lua
| @@ -761,27 +761,20 @@ local function workWinReward(role, bonusData, rewardType, count, sweep) | @@ -761,27 +761,20 @@ local function workWinReward(role, bonusData, rewardType, count, sweep) | ||
| 761 | end | 761 | end |
| 762 | end | 762 | end |
| 763 | 763 | ||
| 764 | - if rewardType == 3 then | ||
| 765 | - reward = bonusData.reward:toNumMap() | ||
| 766 | - for itemId, c in pairs(reward) do | ||
| 767 | - reward[itemId] = c * count | ||
| 768 | - end | ||
| 769 | - for i = 1, count do | ||
| 770 | - local chance = bonusData.chance:randWeight(true) | ||
| 771 | - if chance[1] ~= 0 then | ||
| 772 | - reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] | ||
| 773 | - end | ||
| 774 | - end | 764 | + reward = bonusData.reward:toNumMap() |
| 765 | + for itemId, c in pairs(reward) do | ||
| 766 | + reward[itemId] = c * count | ||
| 775 | end | 767 | end |
| 776 | - if sweep then | ||
| 777 | - -- local bnousReward = role:getBnousSweep() | ||
| 778 | - -- for key, value in pairs(bnousReward) do | ||
| 779 | - -- reward[key] = (reward[key] or 0) + value * count | ||
| 780 | - -- end | 768 | + for i = 1, count do |
| 769 | + local chance = bonusData.chance:randWeight(true) | ||
| 770 | + print(chance) | ||
| 771 | + dump(chance) | ||
| 772 | + if chance[1] ~= 0 then | ||
| 773 | + reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] | ||
| 774 | + end | ||
| 781 | end | 775 | end |
| 782 | 776 | ||
| 783 | reward, change = role:award(reward, {log = {desc = "workBattle", int1 = bonusData.id}}) | 777 | reward, change = role:award(reward, {log = {desc = "workBattle", int1 = bonusData.id}}) |
| 784 | - -- role:checkTaskEnter("BonusPass", {id = bonusData.id, count = count}) | ||
| 785 | return reward, change | 778 | return reward, change |
| 786 | end | 779 | end |
| 787 | 780 |