Commit adfde2d78318a42e29a93fe2f011b4c8f1e53e43
Merge branch 'tr/bugfix-qa' into tr/develop
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
src/models/Diner.lua
@@ -193,10 +193,6 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) | @@ -193,10 +193,6 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) | ||
193 | local addReward = {} | 193 | local addReward = {} |
194 | for key, value in pairs(dishData.item_normal:toNumMap()) do | 194 | for key, value in pairs(dishData.item_normal:toNumMap()) do |
195 | addReward[key] = (addReward[key] or 0) + value * delta | 195 | addReward[key] = (addReward[key] or 0) + value * delta |
196 | - if key == ItemId.Gold then | ||
197 | - local goldPriceAdd = self.owner:getBnousDiner(4,value) | ||
198 | - addReward[key] = addReward[key] + goldPriceAdd * delta | ||
199 | - end | ||
200 | end | 196 | end |
201 | 197 | ||
202 | popular = dishData.famous_normal * delta | 198 | popular = dishData.famous_normal * delta |
@@ -234,10 +230,16 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) | @@ -234,10 +230,16 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) | ||
234 | end | 230 | end |
235 | upValue[-1] = (upValue[-1] or 0) + collectAdd | 231 | upValue[-1] = (upValue[-1] or 0) + collectAdd |
236 | 232 | ||
233 | + -- 电波塔加成 | ||
234 | + local goldCount = self.owner:getBnousDiner(4,addReward[ItemId.Gold]) | ||
235 | + | ||
237 | for id, count in pairs(addReward) do | 236 | for id, count in pairs(addReward) do |
238 | addReward[id] = math.floor(count * (1 + (upValue[id] or 0) / 100)) | 237 | addReward[id] = math.floor(count * (1 + (upValue[id] or 0) / 100)) |
239 | reward = reward:incrv(id, addReward[id]) | 238 | reward = reward:incrv(id, addReward[id]) |
240 | end | 239 | end |
240 | + | ||
241 | + reward = reward:incrv(ItemId.Gold, goldCount) | ||
242 | + | ||
241 | popular = math.floor(popular * (1 + (upValue[-1] or 0) / 100)) | 243 | popular = math.floor(popular * (1 + (upValue[-1] or 0) / 100)) |
242 | 244 | ||
243 | return reward, popular | 245 | return reward, popular |