Commit 34c8cf27287cb2c5f8525e29635d5e5fad3460f0
1 parent
eda7b817
fix: 商店不打折商品,售价为0的bu
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/actions/StoreAction.lua
... | ... | @@ -290,8 +290,12 @@ function _M.shopBuyRpc(agent , data) |
290 | 290 | return 1 |
291 | 291 | end |
292 | 292 | |
293 | - if dataSet.disount == 0 then dataSet.disount = 10 end | |
294 | - local cost = {[dataSet.icon] = math.ceil(dataSet.cost * count * ((dataSet.disount or 10) / 10))} | |
293 | + local cost | |
294 | + if dataSet.disount == 0 then | |
295 | + cost = {[dataSet.icon] = math.ceil(dataSet.cost * count)} | |
296 | + else | |
297 | + cost = {[dataSet.icon] = math.ceil(dataSet.cost * count * ((dataSet.disount or 10) / 10))} | |
298 | + end | |
295 | 299 | |
296 | 300 | |
297 | 301 | local desc = "unknowShop" | ... | ... |