Commit 116ecca6e5996edfb488822201f03a799e496a5d
1 parent
69525ba2
fix: 拾荒商店优惠价格扣除的bug
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/adv/Adv.lua
... | ... | @@ -1712,7 +1712,7 @@ local function clickTrader(self, room, block, params) |
1712 | 1712 | local goodsData = csvdb["event_trader_goodsCsv"][block.event.shop[buyId][1]] |
1713 | 1713 | if not goodsData then return false, 5 end |
1714 | 1714 | |
1715 | - local costCount = math.ceil(goodsData.price * (block.event.shop[buyId][2] or 100) / 100) | |
1715 | + local costCount = math.ceil(goodsData.price * (1 - (block.event.shop[buyId][2] or 100) / 100)) | |
1716 | 1716 | if not self:cost({[goodsData.currency] = costCount}, {log = {desc = "clickTrader", int1 = block.event.id}}) then return false, 6 end --不够 |
1717 | 1717 | self:backCost({[goodsData.currency] = costCount}) |
1718 | 1718 | self:award({[goodsData.item] = goodsData.num}, {log = {desc = "clickTrader", int1 = block.event.id}}, {}) | ... | ... |