Commit 49c2ebe6 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/select_yesno' into 'main'

Feat/select yesno

See merge request !93
parents 3404295a 3ba11a80
Pipeline #19782 passed with stages
in 5 minutes and 16 seconds
Subproject commit c3da8f45d34fcb6fa6d393f9fa02c2cd5e36e6cc
Subproject commit fc8be2c49a17c13ad25040e99293fc29d8b9f4e1
This diff is collapsed.
......@@ -50,5 +50,12 @@
"fieldType": "CardPosition"
}
]
},
"13": {
"protoType": "select_yes_no",
"fields": [
{ "fieldName": "player","fieldType": "uint8" },
{ "fieldName": "effect_description", "fieldType": "uint32" }
]
}
}
......@@ -19,6 +19,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
["move", ygopro.StocGameMessage.MsgMove as Constructor],
["shuffle_hand", ygopro.StocGameMessage.MsgShuffleHand],
["pos_change", ygopro.StocGameMessage.MsgPosChange],
["select_yes_no", ygopro.StocGameMessage.MsgSelectYesNo],
]);
export interface penetrateType {
......
......@@ -17,6 +17,7 @@ import onMsgShuffleHand from "./shuffleHand";
import onMsgSelectBattleCmd from "./selectBattleCmd";
import onMsgPosChange from "./posChange";
import onMsgSelectUnselectCard from "./selectUnselectCard";
import onMsgSelectYesNo from "./selectYesNo";
export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
const dispatch = store.dispatch;
......@@ -108,6 +109,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "select_yes_no": {
onMsgSelectYesNo(msg.select_yes_no, dispatch);
break;
}
default: {
break;
}
......
import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import { AppDispatch } from "../../store";
import MsgSelectYesNo = ygopro.StocGameMessage.MsgSelectYesNo;
export default (selectYesNo: MsgSelectYesNo, dispatch: AppDispatch) => {
const player = selectYesNo.player;
const effect_description = selectYesNo.effect_description;
console.log(`effect_description: ${effect_description}`);
};
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