From eda7b81732932bcf635c2bacd5b28f8472a96d84 Mon Sep 17 00:00:00 2001 From: zqj <582132116@qq.com> Date: Thu, 22 Jul 2021 11:48:07 +0800 Subject: [PATCH] fix: 商店折扣为0 价格为零的bug --- src/actions/StoreAction.lua | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/src/actions/StoreAction.lua b/src/actions/StoreAction.lua index 64d1b04..102ae73 100644 --- a/src/actions/StoreAction.lua +++ b/src/actions/StoreAction.lua @@ -290,6 +290,7 @@ function _M.shopBuyRpc(agent , data) return 1 end + if dataSet.disount == 0 then dataSet.disount = 10 end local cost = {[dataSet.icon] = math.ceil(dataSet.cost * count * ((dataSet.disount or 10) / 10))} -- libgit2 0.21.2