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

fix

parent a0152213
...@@ -218,14 +218,11 @@ end ...@@ -218,14 +218,11 @@ 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)
end end
\ No newline at end of file
...@@ -3696,14 +3696,11 @@ end ...@@ -3696,14 +3696,11 @@ 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)
end 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