选择完英雄后, addPlayer改为updatePlayer

This commit is contained in:
zhl 2020-12-24 10:20:00 +08:00
parent 1fb2dc9605
commit ace0d0cd2a

View File

@ -59,7 +59,7 @@ export class SelectHeroCommand extends Command<CardGameState, { client: Client,
}
player.unitCfgs.set(effectId+'', weight);
}
this.room.battleMan.addPlayer(player);
this.room.battleMan.updatePlayer(player.id, player);
this.room.bSelectHero({errocode: 0, errmsg: '', player: client.sessionId, heroId: heroId});
let readyCount = 0;
for (let [, player] of this.state.players) {