Commit e1c0f99c authored by Chunchi Che's avatar Chunchi Che

fix uuid

parent 31dfb3b5
Pipeline #21451 passed with stages
in 12 minutes and 33 seconds
import { v4 as v4uuid } from "uuid";
import { ygopro } from "@/api";
import { fetchOverlayMeta, store } from "@/stores";
type MsgMove = ygopro.StocGameMessage.MsgMove;
......@@ -27,6 +29,8 @@ export default (move: MsgMove) => {
target.occupant = undefined;
target.overlay_materials = [];
uuid = target.uuid;
// 需要重新分配UUID
target.uuid = v4uuid();
break;
}
case ygopro.CardZone.REMOVED:
......@@ -69,6 +73,9 @@ export default (move: MsgMove) => {
.in(to.location)
.of(to.controler)
.setOccupant(to.sequence, code, to.position);
if (uuid) {
matStore.in(to.location).of(to.controler)[to.sequence].uuid = uuid;
}
break;
}
case ygopro.CardZone.REMOVED:
......
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