Commit 76ae995f authored by Chunchi Che's avatar Chunchi Che

add MsgChainSolved Adapter

parent 48baa6f3
...@@ -115,5 +115,9 @@ ...@@ -115,5 +115,9 @@
"112": { "112": {
"protoType": "attack_disable", "protoType": "attack_disable",
"fields": [] "fields": []
},
"73": {
"protoType": "chain_solved",
"fields": [{ "fieldName": "solved_index", "fieldType": "uint8"}]
} }
} }
...@@ -31,6 +31,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([ ...@@ -31,6 +31,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
["chaining", ygopro.StocGameMessage.MsgChaining], ["chaining", ygopro.StocGameMessage.MsgChaining],
["attack", ygopro.StocGameMessage.MsgAttack], ["attack", ygopro.StocGameMessage.MsgAttack],
["attack_disable", ygopro.StocGameMessage.MsgAttackDisabled], ["attack_disable", ygopro.StocGameMessage.MsgAttackDisabled],
["chain_solved", ygopro.StocGameMessage.MsgChainSolved],
]); ]);
export interface penetrateType { export interface penetrateType {
......
import { ygopro } from "@/api";
export default (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
console.log(chainSolved);
};
...@@ -4,6 +4,7 @@ import { matStore } from "@/stores"; ...@@ -4,6 +4,7 @@ import { matStore } from "@/stores";
import onMsgAttack from "./attack"; import onMsgAttack from "./attack";
import onMsgAttackDisable from "./attackDisable"; import onMsgAttackDisable from "./attackDisable";
import onMsgChaining from "./chaining"; import onMsgChaining from "./chaining";
import onMsgChainSolved from "./chainSolved";
import onMsgDraw from "./draw"; import onMsgDraw from "./draw";
import onMsgFilpSummoned from "./flipSummoned"; import onMsgFilpSummoned from "./flipSummoned";
import onMsgFlipSummoning from "./flipSummoning"; import onMsgFlipSummoning from "./flipSummoning";
...@@ -234,6 +235,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) { ...@@ -234,6 +235,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break; break;
} }
case "chain_solved": {
onMsgChainSolved(msg.chain_solved);
break;
}
case "summoning": { case "summoning": {
onMsgSummoning(msg.summoning); onMsgSummoning(msg.summoning);
......
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