Commit 664e0e07340162fb42c689bf7f5248c74abcc953
1 parent
5ac65e38
电波塔对食材的加成计算错误
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
src/actions/DinerAction.lua
... | ... | @@ -744,13 +744,13 @@ function _M.getGreenhouseRpc( agent, data ) |
744 | 744 | local gfood = role.dinerData:getProperty("gfood") |
745 | 745 | if not next(gfood) then return end |
746 | 746 | |
747 | - local timeSub = role:getBnousDiner(1,buildingData.speed) | |
748 | 747 | local timeAdd = role:getBnousDiner(2,globalCsv.diner_get_food_time_max) |
749 | 748 | |
750 | 749 | for k , v in pairs(gfood) do |
751 | 750 | local itemId = v.id |
752 | 751 | local st = v.st |
753 | - local speed = globalCsv.diner_get_food_speed[csvdb["itemCsv"][itemId].quality] * (buildingData.speed + timeSub) / 100 | |
752 | + local speed = globalCsv.diner_get_food_speed[csvdb["itemCsv"][itemId].quality] * buildingData.speed / 100 | |
753 | + speed = speed + role:getBnousDiner(1,speed) | |
754 | 754 | local endTime = st + globalCsv.diner_get_food_time_max + timeAdd |
755 | 755 | local endTime2 = math.min(now, endTime) |
756 | 756 | reward[itemId] = math.floor((endTime2 - st) / speed) | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -745,6 +745,7 @@ function _M.openSpeedUpBoxRpc(agent, data) |
745 | 745 | for k , v in pairs(gfood) do |
746 | 746 | local itemId = v.id |
747 | 747 | local speed = globalCsv.diner_get_food_speed[csvdb["itemCsv"][itemId].quality] * buildingData.speed / 100 |
748 | + speed = speed + role:getBnousDiner(1,speed) | |
748 | 749 | reward[itemId] = (reward[itemId] or 0) + math.floor((time / speed) * count) |
749 | 750 | end |
750 | 751 | else | ... | ... |