游戏结果上报增加mode字段
This commit is contained in:
parent
2518157e5b
commit
1c977139f4
@ -195,7 +195,7 @@ export class GameResultCommand extends Command<CardGameState, {}> {
|
||||
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<CardGameState, {}> {
|
||||
* @param mvp
|
||||
* @param mvpScore
|
||||
*/
|
||||
async reportGameResult(winner: number, mvp: string, mvpScore: number, results: Map<Player, GameResult>) {
|
||||
async reportGameResult(winner: number, mvp: string, mvpScore: number, results: Map<Player, GameResult>, 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user