游戏结果上报增加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)
|
this.room.beginSchedule(time, resultTimeOver, ClockNameConst.RESTART_SCHEDULE)
|
||||||
let saveData: any
|
let saveData: any
|
||||||
try {
|
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) {
|
} catch (e) {
|
||||||
error(e)
|
error(e)
|
||||||
}
|
}
|
||||||
@ -262,13 +262,14 @@ export class GameResultCommand extends Command<CardGameState, {}> {
|
|||||||
* @param mvp
|
* @param mvp
|
||||||
* @param mvpScore
|
* @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 = {
|
let data: any = {
|
||||||
roomid: this.room.roomId,
|
roomid: this.room.roomId,
|
||||||
round: this.state.round,
|
round: this.state.round,
|
||||||
winner: winner,
|
winner: winner,
|
||||||
season: this.room.match ? 1 : 0,
|
season: this.room.match ? 1 : 0,
|
||||||
matchid: this.room.match
|
matchid: this.room.match,
|
||||||
|
mode
|
||||||
}
|
}
|
||||||
let players: any[] = []
|
let players: any[] = []
|
||||||
let i = 0
|
let i = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user