diff --git a/src/rooms/GeneralRoom.ts b/src/rooms/GeneralRoom.ts index cc953f5..cabfbc1 100644 --- a/src/rooms/GeneralRoom.ts +++ b/src/rooms/GeneralRoom.ts @@ -74,7 +74,7 @@ export class GeneralRoom extends Room { this.onMessage("select_hero_c2s", (client, message) => { msgLog('select_hero from ', client.sessionId, JSON.stringify(message)); - this.dispatcher.dispatch(new SelectHeroCommand(), {client, heroId: message.heroId}); + this.dispatcher.dispatch(new SelectHeroCommand(), {client, heroId: message.heroId, cardGroup: message.cardgroup}); }); this.onMessage("gm", (client, message) => { diff --git a/src/rooms/commands/SelectHeroCommand.ts b/src/rooms/commands/SelectHeroCommand.ts index 2dde1f0..f30da47 100644 --- a/src/rooms/commands/SelectHeroCommand.ts +++ b/src/rooms/commands/SelectHeroCommand.ts @@ -11,8 +11,8 @@ import {StateTypeEnum} from "../enums/StateTypeEnum"; /** * 选择英雄 */ -export class SelectHeroCommand extends Command { - execute({client, heroId} = this.payload) { +export class SelectHeroCommand extends Command { + execute({client, heroId, cardGroup} = this.payload) { let player = this.state.players.get(client.sessionId); if (player.state != PlayerStateConst.PLAYER_READY) { return; @@ -48,6 +48,7 @@ export class SelectHeroCommand extends Command