diff --git a/project/src/callbacks/GameCallbacks.ts b/project/src/callbacks/GameCallbacks.ts index a47b1129..f381af70 100644 --- a/project/src/callbacks/GameCallbacks.ts +++ b/project/src/callbacks/GameCallbacks.ts @@ -109,11 +109,7 @@ class GameCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { - return this.httpResponse.getBody({ - msg: "OK", - // eslint-disable-next-line @typescript-eslint/naming-convention - utc_time: new Date().getTime() / 1000 - }); + return this.httpResponse.getBody(this.gameController.getKeepAlive(sessionID)); } /** diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index b4872358..09bc4dea 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -12,6 +12,7 @@ import { BodyPartHealth } from "../models/eft/common/tables/IBotBase"; import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse"; import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; +import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse"; import { IServerDetails } from "../models/eft/game/IServerDetails"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { ConfigTypes } from "../models/enums/ConfigTypes"; @@ -232,6 +233,19 @@ export class GameController }; } + /** + * Handle client/game/keepalive + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public getKeepAlive(sessionId: string): IGameKeepAliveResponse + { + return { + msg: "OK", + // eslint-disable-next-line @typescript-eslint/naming-convention + utc_time: new Date().getTime() / 1000 + }; + } + /** * BSG have two values for shotgun dispersion, we make sure both have the same value */