Commit 1ad11117 authored by Chunchi Che's avatar Chunchi Che

fix win

parent 536ed9e6
Pipeline #21668 passed with stages
in 15 minutes and 20 seconds
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import { matStore } from "@/stores"; import { matStore } from "@/stores";
import MsgWin = ygopro.StocGameMessage.MsgWin;
export default (win: ygopro.StocGameMessage.MsgWin) => { export default (win: MsgWin) => {
matStore.result = win.type_; const player = win.player;
if (matStore.isMe(player)) {
matStore.result = win.type_;
} else {
matStore.result =
win.type_ == MsgWin.ActionType.Win
? MsgWin.ActionType.Defeated
: MsgWin.ActionType.Win;
}
}; };
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