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