Moved keepalive code out of GameCallbacks and into its own function inside GameControler
This commit is contained in:
parent
c1e7c70c65
commit
2b6980358c
@ -109,11 +109,7 @@ class GameCallbacks
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
public gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>
|
public gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody({
|
return this.httpResponse.getBody(this.gameController.getKeepAlive(sessionID));
|
||||||
msg: "OK",
|
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
||||||
utc_time: new Date().getTime() / 1000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,6 +12,7 @@ import { BodyPartHealth } from "../models/eft/common/tables/IBotBase";
|
|||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { ConfigTypes } from "../models/enums/ConfigTypes";
|
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
|
* BSG have two values for shotgun dispersion, we make sure both have the same value
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user