Commit 7f9243b6 authored by Nemo Ma's avatar Nemo Ma

fix

parent a0152213
...@@ -218,13 +218,10 @@ end ...@@ -218,13 +218,10 @@ end
--Others --Others
function Duel.IgnoreActionCheck(f,...) function Duel.IgnoreActionCheck(f,...)
Duel.DisableActionCheck(true) Duel.DisableActionCheck(true)
local cr=coroutine.create(f)
local ret={} local ret={}
while coroutine.status(cr)~="dead" do local sret={pcall(f,...)}
local sret={coroutine.resume(cr,...)} for i=2,#sret do
for i=2,#sret do table.insert(ret,sret[i])
table.insert(ret,sret[i])
end
end end
Duel.DisableActionCheck(false) Duel.DisableActionCheck(false)
return table.unpack(ret) return table.unpack(ret)
......
...@@ -3696,13 +3696,10 @@ end ...@@ -3696,13 +3696,10 @@ end
function Duel.IgnoreActionCheck(f,...) function Duel.IgnoreActionCheck(f,...)
Duel.DisableActionCheck(true) Duel.DisableActionCheck(true)
local cr=coroutine.create(f)
local ret={} local ret={}
while coroutine.status(cr)~="dead" do local sret={pcall(f,...)}
local sret={coroutine.resume(cr,...)} for i=2,#sret do
for i=2,#sret do table.insert(ret,sret[i])
table.insert(ret,sret[i])
end
end end
Duel.DisableActionCheck(false) Duel.DisableActionCheck(false)
return table.unpack(ret) return table.unpack(ret)
......
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