function CheckCompositeCommonBind(sysarg, consumes, nCount)
local nMaxCount = 0
local bBind = false
for k,v in pairs(consumes)do
if(v.id ~= 0)then
--有多少绑定材料
local haveCount = Actor.getItemCount(sysarg, v.id, 0, 0, 1)
--能合成多少个绑定的道具
local giveCount,fGiveCount = math.modf(haveCount / v.count)
--如果获得数量大于0且有余数
if(0 < haveCount and fGiveCount ~= 0)then
bBind = true
end
if(nMaxCount < giveCount)then
nMaxCount = giveCount
end
--BaseFuc_Print(haveCount,giveCount,fGiveCount)
end
end
if(bBind == true)then
nMaxCount = nMaxCount + 1
end
if(nCount < nMaxCount)then
nMaxCount = nCount
end
--BaseFuc_Print("nMaxCount",bBind, nMaxCount)
return nMaxCount
end