Commit ec3ba8821921b7fa4b80b989bff047c30441ec45
Merge branch 'cn/develop' into cn/publish/zhaolu
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/actions/StoreAction.lua
... | ... | @@ -400,7 +400,6 @@ function _M.shopBuyRpc(agent , data) |
400 | 400 | end |
401 | 401 | |
402 | 402 | if not role:checkItemEnough(cost) then return 4 end |
403 | - if not role:costItems(cost, {log = {desc = desc, int1 = id, int2 = count, long1= dataSet.shop}}) then return 5 end | |
404 | 403 | |
405 | 404 | local buyRecord = role.storeData:getProperty("buyR") |
406 | 405 | if math.illegalNum(count, 1, (dataSet.limit == 0 and 10000 or dataSet.limit - (buyRecord[id] or 0))) then |
... | ... | @@ -408,6 +407,8 @@ function _M.shopBuyRpc(agent , data) |
408 | 407 | return 6 |
409 | 408 | end |
410 | 409 | |
410 | + if not role:costItems(cost, {log = {desc = desc, int1 = id, int2 = count, long1= dataSet.shop}}) then return 5 end | |
411 | + | |
411 | 412 | local limitStr = "" |
412 | 413 | if dataSet.limit ~= 0 then |
413 | 414 | buyRecord[id] = (buyRecord[id] or 0) + count | ... | ... |