Commit a2bacf5f authored by JoyJ's avatar JoyJ

add a try to avoid invalid decks

parent 27a922fd
......@@ -234,12 +234,17 @@ ygopro.stoc_follow_after("CHANGE_SIDE", true, (buffer, info, client, server, dat
var compat_deckbuf = client.main.concat(client.side);
client.deckMd5 = global.dc_decks_md5[deckindex];
}
ygopro.ctos_send(server, "UPDATE_DECK", {
mainc: client.main.length,
sidec: client.side.length,
deckbuf: compat_deckbuf
});
try {
ygopro.ctos_send(server, "UPDATE_DECK", {
mainc: client.main.length,
sidec: client.side.length,
deckbuf: compat_deckbuf
});
}
catch {
log.info("READY_FAILURE : " + global.dc_decks_md5[deckindex]);
ygopro.stoc_send_chat(client, "意外的错误,你可能抽到了无效卡组。请重新准备", ygopro.constants.COLORS.YELLOW);
}
if (MirrorMode) {
return true;
......
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