Commit d3d1bc0e authored by chechunchi's avatar chechunchi

fix

parent b8660288
......@@ -25,11 +25,14 @@ export default (data: Uint8Array) => {
if ((positions & 0x1) > 0) {
msg.positions.push(ygopro.CardPosition.FACEUP_ATTACK);
} else if ((positions & 0x2) > 0) {
}
if ((positions & 0x2) > 0) {
msg.positions.push(ygopro.CardPosition.FACEDOWN_ATTACK);
} else if ((positions & 0x4) > 0) {
}
if ((positions & 0x4) > 0) {
msg.positions.push(ygopro.CardPosition.FACEUP_DEFENSE);
} else if ((positions & 0x8) > 0) {
}
if ((positions & 0x8) > 0) {
msg.positions.push(ygopro.CardPosition.FACEDOWN_DEFENSE);
}
......
......@@ -11,6 +11,7 @@ import onMsgMove from "./move";
import onMsgSelectCard from "./selectCard";
import onMsgSelectChain from "./selectChain";
import onMsgSelectEffectYn from "./selectEffectYn";
import onMsgSelectPosition from "./selectPosition";
export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
const dispatch = store.dispatch;
......@@ -83,6 +84,12 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "select_position": {
const selectPosition = msg.select_position;
onMsgSelectPosition(selectPosition, dispatch);
break;
}
default: {
break;
}
......
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