Commit 2bb89538b2cb0f8b5d0acc7ffbd294ef7a173260
Merge branch 'tr/bugfix' into tr/publish/preview
Showing
2 changed files
with
9 additions
and
18 deletions
Show diff stats
src/actions/HangAction.lua
| @@ -761,27 +761,18 @@ local function workWinReward(role, bonusData, rewardType, count, sweep) | @@ -761,27 +761,18 @@ 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 | + if chance[1] ~= 0 then | ||
| 771 | + reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] | ||
| 772 | + end | ||
| 781 | end | 773 | end |
| 782 | 774 | ||
| 783 | reward, change = role:award(reward, {log = {desc = "workBattle", int1 = bonusData.id}}) | 775 | reward, change = role:award(reward, {log = {desc = "workBattle", int1 = bonusData.id}}) |
| 784 | - -- role:checkTaskEnter("BonusPass", {id = bonusData.id, count = count}) | ||
| 785 | return reward, change | 776 | return reward, change |
| 786 | end | 777 | end |
| 787 | 778 |
src/models/RolePlugin.lua
| @@ -1343,7 +1343,7 @@ function RolePlugin.bind(Role) | @@ -1343,7 +1343,7 @@ function RolePlugin.bind(Role) | ||
| 1343 | for idx, set in ipairs(csvdb["seaport_purchaseCsv"]) do | 1343 | for idx, set in ipairs(csvdb["seaport_purchaseCsv"]) do |
| 1344 | local done = true | 1344 | local done = true |
| 1345 | for id, data in ipairs(set) do | 1345 | for id, data in ipairs(set) do |
| 1346 | - if donate[id] or not result[idx] or not result[idx][id] or result[idx][id] < data.need_num then | 1346 | + if donate[idx] or not result[idx] or not result[idx][id] or result[idx][id] < data.need_num then |
| 1347 | done = false | 1347 | done = false |
| 1348 | break | 1348 | break |
| 1349 | end | 1349 | end |