Commit fcb9a070e823a181ec86f6e296c1b488e8894c39

Authored by zhangqijia
1 parent 1a26a647

fix: costItem 消耗等于0的商品允许购买

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/models/RolePlugin.lua
@@ -444,7 +444,7 @@ function RolePlugin.bind(Role) @@ -444,7 +444,7 @@ function RolePlugin.bind(Role)
444 function Role:costItems(itemCountT, params) 444 function Role:costItems(itemCountT, params)
445 local pms = clone(params or {}) 445 local pms = clone(params or {})
446 for _, v in pairs(itemCountT) do 446 for _, v in pairs(itemCountT) do
447 - if v <= 0 then return false end 447 + if v < 0 then return false end
448 end 448 end
449 449
450 if itemCountT[ItemId.Diamond] then --优先扣除钻石 450 if itemCountT[ItemId.Diamond] then --优先扣除钻石