Commit a33e91cc authored by chechunchi's avatar chechunchi

fix panic

parent d3d43618
Pipeline #21995 passed with stages
in 16 minutes and 34 seconds
......@@ -47,8 +47,18 @@ export default async (move: MsgMove) => {
// 超量素材的去除
const xyzMonster = cardStore.at(MZONE, from.controler, from.sequence);
if (xyzMonster) {
target = xyzMonster.overlayMaterials.splice(from.overlay_sequence, 1)[0];
target.xyzMonster = undefined;
const overlay = xyzMonster.overlayMaterials
.splice(from.overlay_sequence, 1)
.at(0);
if (overlay) {
target = overlay;
target.xyzMonster = undefined;
} else {
console.warn(
`<Move>overlay from zone=${MZONE}, controller=${from.controler}, sequence=${from.sequence}, overlay_sequence=${from.overlay_sequence} is null`
);
return;
}
} else {
console.warn(
`<Move>xyzMonster from zone=${MZONE}, controller=${from.controler}, sequence=${from.sequence} is null`
......
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