Commit 2c2a9052 authored by mercury233's avatar mercury233 Committed by GitHub

fix & update aux.IsMaterialListSetCard (#1209)

c.material_setcode can be table
parent 88e1a38a
...@@ -1944,7 +1944,15 @@ function Auxiliary.IsMaterialListCode(c,code) ...@@ -1944,7 +1944,15 @@ function Auxiliary.IsMaterialListCode(c,code)
return false return false
end end
function Auxiliary.IsMaterialListSetCard(c,setcode) function Auxiliary.IsMaterialListSetCard(c,setcode)
return c.material_setcode and c.material_setcode&setcode==setcode if not c.material_setcode then return false end
if type(c.material_setcode)=='table' then
for i,scode in ipairs(c.material_setcode) do
if setcode&0xfff==scode&0xfff and setcode&scode==setcode then return true end
end
else
return setcode&0xfff==c.material_setcode&0xfff and setcode&c.material_setcode==setcode
end
return false
end end
function Auxiliary.IsCodeListed(c,code) function Auxiliary.IsCodeListed(c,code)
if not c.card_code_list then return false end if not c.card_code_list then return false end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment