diff --git a/src/actions/CarAction.lua b/src/actions/CarAction.lua index 94c00ad..572ecb8 100644 --- a/src/actions/CarAction.lua +++ b/src/actions/CarAction.lua @@ -90,7 +90,7 @@ function _M.equipUpRpc( agent, data ) local nextEquip = dataSet[nextLv] if not nextEquip then return 23 end - local limit = csvdb["itemCsv"][nextEquip.id].limit ~= 0 and csvdb["itemCsv"][nextEquip.id].limit or math.huge + local limit = csvdb["itemCsv"][nextEquip.id].limit ~= 0 and csvdb["itemCsv"][nextEquip.id].limit or 10000 if math.illegalNum(count, 1, limit) then return 0 end diff --git a/src/actions/PvpAction.lua b/src/actions/PvpAction.lua index 6477a75..129295b 100644 --- a/src/actions/PvpAction.lua +++ b/src/actions/PvpAction.lua @@ -237,7 +237,7 @@ function _M.buyCountRpc(agent, data) local msg = MsgPack.unpack(data) local count = msg.count - if math.illegalNum(count, 1, math.huge) then + if math.illegalNum(count, 1, 10000) then return 1 end diff --git a/src/actions/StoreAction.lua b/src/actions/StoreAction.lua index 33f0ed2..897d9be 100644 --- a/src/actions/StoreAction.lua +++ b/src/actions/StoreAction.lua @@ -326,7 +326,7 @@ function _M.shopBuyRpc(agent , data) end local buyRecord = role.storeData:getProperty("buyR") - if math.illegalNum(count, 1, (dataSet.limit == 0 and math.huge or dataSet.limit - (buyRecord[id] or 0))) then + if math.illegalNum(count, 1, (dataSet.limit == 0 and 10000 or dataSet.limit - (buyRecord[id] or 0))) then skynet.error(string.format("shop buy over limit, user_id:%d, goods_id:%d", role:getProperty("id"), id)) return 1 end -- libgit2 0.21.2