Commit cd4bc13c8152819606f5e1a6a2ef92fc139f138c
1 parent
52837c5a
商店购买刷购买上限bug 导致虹光玉溢出
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
src/actions/CarAction.lua
| ... | ... | @@ -90,7 +90,7 @@ function _M.equipUpRpc( agent, data ) |
| 90 | 90 | local nextEquip = dataSet[nextLv] |
| 91 | 91 | if not nextEquip then return 23 end |
| 92 | 92 | |
| 93 | - local limit = csvdb["itemCsv"][nextEquip.id].limit ~= 0 and csvdb["itemCsv"][nextEquip.id].limit or math.huge | |
| 93 | + local limit = csvdb["itemCsv"][nextEquip.id].limit ~= 0 and csvdb["itemCsv"][nextEquip.id].limit or 10000 | |
| 94 | 94 | |
| 95 | 95 | if math.illegalNum(count, 1, limit) then return 0 end |
| 96 | 96 | ... | ... |
src/actions/PvpAction.lua
src/actions/StoreAction.lua
| ... | ... | @@ -326,7 +326,7 @@ function _M.shopBuyRpc(agent , data) |
| 326 | 326 | end |
| 327 | 327 | |
| 328 | 328 | local buyRecord = role.storeData:getProperty("buyR") |
| 329 | - if math.illegalNum(count, 1, (dataSet.limit == 0 and math.huge or dataSet.limit - (buyRecord[id] or 0))) then | |
| 329 | + if math.illegalNum(count, 1, (dataSet.limit == 0 and 10000 or dataSet.limit - (buyRecord[id] or 0))) then | |
| 330 | 330 | skynet.error(string.format("shop buy over limit, user_id:%d, goods_id:%d", role:getProperty("id"), id)) |
| 331 | 331 | return 1 |
| 332 | 332 | end | ... | ... |