diff --git a/src/actions/StoreAction.lua b/src/actions/StoreAction.lua index 102ae73..8c91abc 100644 --- a/src/actions/StoreAction.lua +++ b/src/actions/StoreAction.lua @@ -290,8 +290,12 @@ 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))} + local cost + if dataSet.disount == 0 then + cost = {[dataSet.icon] = math.ceil(dataSet.cost * count)} + else + cost = {[dataSet.icon] = math.ceil(dataSet.cost * count * ((dataSet.disount or 10) / 10))} + end local desc = "unknowShop" -- libgit2 0.21.2