diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/battle/handler/comBattleHandler.ts index aa44258f9..08c0bcb63 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/battle/handler/comBattleHandler.ts @@ -111,8 +111,8 @@ export class ComBattleHandler { let roleStatus = new RoleStatus(); roleStatus.heroes = []; roleStatus.isCap = false; - roleStatus.headHid = headHid || roleStatus.headHid; - roleStatus.topFiveCe = topFiveCe || roleStatus.topFiveCe; + roleStatus.headHid = headHid || 1; + roleStatus.topFiveCe = topFiveCe || 0; roleStatus.roleId = roleId; roleStatus.isFrd = isFrd; const team = await ComBattleTeamModel.addRole(teamCode, roleStatus); @@ -126,7 +126,7 @@ export class ComBattleHandler { if (users.indexOf(roleId) === -1) { channel.add(roleId, sid); } - channel.pushMessage('onTeamJoin', {teamCode, roleInfo: {roleId, headHid, topFiveCe}}); + channel.pushMessage('onTeamJoin', {teamCode, roleInfo: {roleId, headHid: roleStatus.headHid, topFiveCe: roleStatus.topFiveCe}}); teamStatus.roleIds.push(roleId); teamStatus.roleStatus.push(roleStatus);