Commit b9f33694 authored by Chunchi Che's avatar Chunchi Che

add some log

parent 01b9e6f1
Pipeline #21769 passed with stages
in 13 minutes and 21 seconds
......@@ -17,6 +17,8 @@ export default (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
// 设置被连锁状态为空
matStore.setChained(location, undefined);
} else {
console.warn("pop from chains return null!");
console.warn(
`pop from chains return null! solved_index=${chainSolved.solved_index}, len of chains in store=${matStore.chains.length}`
);
}
};
......@@ -48,6 +48,11 @@ export default async (move: MsgMove) => {
.in(from.location)
.of(from.controler)
.remove(from.sequence);
if (removed === undefined) {
console.warn(`remove from matStore return undefined, location=${from}`);
}
uuid = removed.uuid;
chainIndex = removed.chainIndex;
......
......@@ -292,6 +292,8 @@ export const matStore: MatState = proxy<MatState>({
.at(location.sequence);
if (target) {
target.chainIndex = chainIndex;
} else {
console.warn(`target is null in setChained, location=${location}`);
}
},
});
......
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