From 1c977139f4dfa6701b92d28d745d4287d9f45fa9 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 3 Mar 2021 14:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=BB=93=E6=9E=9C=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E5=A2=9E=E5=8A=A0mode=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/commands/GameResultCommand.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rooms/commands/GameResultCommand.ts b/src/rooms/commands/GameResultCommand.ts index 9fee08f..ab48f9a 100644 --- a/src/rooms/commands/GameResultCommand.ts +++ b/src/rooms/commands/GameResultCommand.ts @@ -195,7 +195,7 @@ export class GameResultCommand extends Command { this.room.beginSchedule(time, resultTimeOver, ClockNameConst.RESTART_SCHEDULE) let saveData: any try { - saveData = (await self.reportGameResult(winner, mvp.id, results.get(mvp).mvpScore, results)).data.data + saveData = (await self.reportGameResult(winner, mvp.id, results.get(mvp).mvpScore, results, this.state.mode)).data.data } catch (e) { error(e) } @@ -262,13 +262,14 @@ export class GameResultCommand extends Command { * @param mvp * @param mvpScore */ - async reportGameResult(winner: number, mvp: string, mvpScore: number, results: Map) { + async reportGameResult(winner: number, mvp: string, mvpScore: number, results: Map, mode: number) { let data: any = { roomid: this.room.roomId, round: this.state.round, winner: winner, season: this.room.match ? 1 : 0, - matchid: this.room.match + matchid: this.room.match, + mode } let players: any[] = [] let i = 0