修正座次号设置错误的bug
This commit is contained in:
parent
5b8d48197c
commit
c423e715a3
@ -43,6 +43,7 @@ export class OnJoinCommand extends Command<CardGameState, {
|
|||||||
const team = (idx == 1 || idx == 2) ? 1 : 0;
|
const team = (idx == 1 || idx == 2) ? 1 : 0;
|
||||||
// end of set seat and team
|
// end of set seat and team
|
||||||
let player = new Player(client.sessionId, idx, team);
|
let player = new Player(client.sessionId, idx, team);
|
||||||
|
this.state.players.set(client.sessionId, player);
|
||||||
let uinfo: {nickname: string, avatar: string, score: number, accountid: string}
|
let uinfo: {nickname: string, avatar: string, score: number, accountid: string}
|
||||||
if (accountId && accountId != 'robot') {
|
if (accountId && accountId != 'robot') {
|
||||||
uinfo = await getUserInfo(accountId)
|
uinfo = await getUserInfo(accountId)
|
||||||
@ -57,8 +58,6 @@ export class OnJoinCommand extends Command<CardGameState, {
|
|||||||
player.nickname = uinfo.nickname
|
player.nickname = uinfo.nickname
|
||||||
player.avatar = uinfo.avatar
|
player.avatar = uinfo.avatar
|
||||||
player.score = uinfo.score
|
player.score = uinfo.score
|
||||||
|
|
||||||
this.state.players.set(client.sessionId, player);
|
|
||||||
this.room.addAssistClient(client.sessionId);
|
this.room.addAssistClient(client.sessionId);
|
||||||
let self = this;
|
let self = this;
|
||||||
if (!this.room.match) {
|
if (!this.room.match) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user