Commit 639037cd authored by nanahira's avatar nanahira

no send chat and replay to windbot & fix tag duel deck

parent 86b0f261
Pipeline #43240 failed with stages
in 98 minutes and 19 seconds
......@@ -29,7 +29,7 @@
"ygopro-cdb-encode": "^1.0.2",
"ygopro-deck-encode": "^1.0.15",
"ygopro-lflist-encode": "^1.0.3",
"ygopro-msg-encode": "^1.1.25",
"ygopro-msg-encode": "^1.1.27",
"ygopro-yrp-encode": "^1.0.1",
"yuzuthread": "^1.0.8"
},
......@@ -7318,9 +7318,9 @@
}
},
"node_modules/ygopro-msg-encode": {
"version": "1.1.25",
"resolved": "https://registry.npmjs.org/ygopro-msg-encode/-/ygopro-msg-encode-1.1.25.tgz",
"integrity": "sha512-0iitV9oCINFCtrXYA1jYp2R6RuU0KXJkvBVamnjtv8HFtS82aPZ1R4D3h3RsLVukPQyqH9hb69vcujt7dYOzrA==",
"version": "1.1.27",
"resolved": "https://registry.npmjs.org/ygopro-msg-encode/-/ygopro-msg-encode-1.1.27.tgz",
"integrity": "sha512-cPiiRAorMdQdip0L47vwwVyZTZ1I8Yu63Q3qnAQ7oEGG2brKhnJ4SARBw4x0wQZ0DgcPf9Yr8SyuZxnNoS2O4g==",
"license": "MIT",
"dependencies": {
"typed-reflector": "^1.0.14",
......
......@@ -124,6 +124,9 @@ export class Client {
}
async sendChat(msg: string, type: number = ChatColor.BABYBLUE) {
if (this.isInternal) {
return;
}
if (type >= ChatColor.RED) {
msg = `[Server]: ${msg}`;
}
......
......@@ -406,6 +406,9 @@ export class Room {
}
private async sendReplays(client: Client) {
if (client.isInternal) {
return;
}
for (let i = 0; i < this.duelRecords.length; i++) {
const duelRecord = this.duelRecords[i];
await client.sendChat(
......@@ -1167,7 +1170,9 @@ export class Room {
);
if (this.isPosSwapped) {
this.playingPlayers.forEach((p) => {
duelRecord.players[this.getIngameDuelPos(p)] = {
// Keep full seat order (0/1/2/3 in tag), matching tag_duel.cpp swap:
// swap(0,2) and swap(1,3)
duelRecord.players[this.getIngamePos(p)] = {
name: p.name,
deck: p.deck!,
};
......
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