Send total in game time on game start

This commit is contained in:
Dev 2023-07-24 16:38:28 +01:00
parent 848302e769
commit 070b9c7ad6

View File

@ -225,6 +225,8 @@ export class GameController
*/ */
public getGameConfig(sessionID: string): IGameConfigResponse public getGameConfig(sessionID: string): IGameConfigResponse
{ {
const profile = this.profileHelper.getPmcProfile(sessionID);
const config: IGameConfigResponse = { const config: IGameConfigResponse = {
languages: this.databaseServer.getTables().locales.languages, languages: this.databaseServer.getTables().locales.languages,
ndaFree: false, ndaFree: false,
@ -243,7 +245,7 @@ export class GameController
}, },
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention
utc_time: new Date().getTime() / 1000, utc_time: new Date().getTime() / 1000,
totalInGame: 1 totalInGame: profile.Stats.TotalInGameTime
}; };
return config; return config;