@@ -14,10 +14,7 @@ import {
14
14
import { GetUserInfoQuery } from 'gateway/queries/GetUserInfo/get-user-info.query' ;
15
15
import { GetUserInfoQueryResult } from 'gateway/queries/GetUserInfo/get-user-info-query.result' ;
16
16
import { MatchEntity } from 'gameserver/model/match.entity' ;
17
- import { MatchmakingMode } from 'gateway/shared-types/matchmaking-mode' ;
18
- import { Dota_GameMode } from 'gateway/shared-types/dota-game-mode' ;
19
17
import { MatchmakingModeMappingEntity } from 'gameserver/model/matchmaking-mode-mapping.entity' ;
20
- import { Dota_Map } from 'gateway/shared-types/dota-map' ;
21
18
import { GamePreparedEvent } from 'gameserver/event/game-prepared.event' ;
22
19
import { ConfigService } from '@nestjs/config' ;
23
20
@@ -63,40 +60,6 @@ export class FindGameServerHandler
63
60
await this . submitQueueTask ( m . id , gsInfo ) ;
64
61
}
65
62
66
- private async getMapForMatchMode ( mode : MatchmakingMode ) : Promise < Dota_Map > {
67
- const mapping = await this . matchmakingModeMappingEntityRepository . findOne ( {
68
- where : {
69
- lobbyType : mode ,
70
- } ,
71
- } ) ;
72
-
73
- if ( ! mapping ) {
74
- this . logger . error (
75
- `No mapping found for lobby type ${ mode } ! Returning all pick` ,
76
- ) ;
77
- return Dota_Map . DOTA ;
78
- }
79
- return mapping . dotaMap ;
80
- }
81
-
82
- private async getGameModeForMatchMode (
83
- mode : MatchmakingMode ,
84
- ) : Promise < Dota_GameMode > {
85
- const mapping = await this . matchmakingModeMappingEntityRepository . findOne ( {
86
- where : {
87
- lobbyType : mode ,
88
- } ,
89
- } ) ;
90
-
91
- if ( ! mapping ) {
92
- this . logger . error (
93
- `No mapping found for lobby type ${ mode } ! Returning all pick` ,
94
- ) ;
95
- return Dota_GameMode . ALLPICK ;
96
- }
97
- return mapping . dotaGameMode ;
98
- }
99
-
100
63
private async extendMatchInfo (
101
64
matchInfo : GamePreparedEvent ,
102
65
) : Promise < GSMatchInfo > {
@@ -117,8 +80,8 @@ export class FindGameServerHandler
117
80
118
81
return new GSMatchInfo (
119
82
matchInfo . mode ,
120
- await this . getMapForMatchMode ( matchInfo . mode ) ,
121
- await this . getGameModeForMatchMode ( matchInfo . mode ) ,
83
+ matchInfo . map ,
84
+ matchInfo . gameMode ,
122
85
matchInfo . roomId ,
123
86
players ,
124
87
matchInfo . version ,
0 commit comments