Commit 1917a4a41b6fb02e33b5009ce2aea472abb96ffc

Authored by zhangqijia
1 parent 7af54527

fix: 拾荒 商店未优惠商品bug

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/adv/Adv.lua
... ... @@ -1713,7 +1713,7 @@ local function clickTrader(self, room, block, params)
1713 1713 local goodsData = csvdb["event_trader_goodsCsv"][block.event.shop[buyId][1]]
1714 1714 if not goodsData then return false, 5 end
1715 1715  
1716   - local costCount = math.ceil(goodsData.price * (1 - (block.event.shop[buyId][2] or 100) / 100))
  1716 + local costCount = math.ceil(goodsData.price * (1 - (block.event.shop[buyId][2] or 0) / 100))
1717 1717 if not self:cost({[goodsData.currency] = costCount}, {log = {desc = "clickTrader", int1 = block.event.id}}) then return false, 6 end --不够
1718 1718 self:backCost({[goodsData.currency] = costCount})
1719 1719 self:award({[goodsData.item] = goodsData.num}, {log = {desc = "clickTrader", int1 = block.event.id}}, {})
... ...