Commit 7c0401ad authored by Chunchi Che's avatar Chunchi Che

fix small

parent 74603d6a
Pipeline #19756 passed with stages
in 5 minutes and 2 seconds
...@@ -36,9 +36,13 @@ export default (move: MsgMove, dispatch: AppDispatch) => { ...@@ -36,9 +36,13 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break; break;
} }
case ygopro.CardZone.SZONE: { case ygopro.CardZone.SZONE: {
if (from.sequence < 5) {
dispatch( dispatch(
removeMagic({ controler: from.controler, sequence: from.sequence }) removeMagic({ controler: from.controler, sequence: from.sequence })
); );
} else {
dispatch(removeField({ controler: from.controler }));
}
break; break;
} }
...@@ -56,11 +60,6 @@ export default (move: MsgMove, dispatch: AppDispatch) => { ...@@ -56,11 +60,6 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break; break;
} }
case ygopro.CardZone.ONFIELD: {
dispatch(removeField({ controler: from.controler }));
break;
}
default: { default: {
console.log(`Unhandled zone type ${from.location}`); console.log(`Unhandled zone type ${from.location}`);
break; break;
...@@ -81,6 +80,7 @@ export default (move: MsgMove, dispatch: AppDispatch) => { ...@@ -81,6 +80,7 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break; break;
} }
case ygopro.CardZone.SZONE: { case ygopro.CardZone.SZONE: {
if (to.sequence < 5) {
dispatch( dispatch(
fetchMagicMeta({ fetchMagicMeta({
controler: to.controler, controler: to.controler,
...@@ -89,6 +89,15 @@ export default (move: MsgMove, dispatch: AppDispatch) => { ...@@ -89,6 +89,15 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
code, code,
}) })
); );
} else {
dispatch(
fetchFieldMeta({
controler: to.controler,
sequence: to.sequence,
code,
})
);
}
break; break;
} }
...@@ -121,13 +130,6 @@ export default (move: MsgMove, dispatch: AppDispatch) => { ...@@ -121,13 +130,6 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break; break;
} }
case ygopro.CardZone.ONFIELD: {
dispatch(
fetchFieldMeta({ controler: to.controler, sequence: to.sequence, code })
);
break;
}
default: { default: {
console.log(`Unhandled zone type ${to.location}`); console.log(`Unhandled zone type ${to.location}`);
......
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