From 65659372dd2428db2dc523463c36854e96835e4f Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 14 Jul 2023 13:07:41 +0100 Subject: [PATCH] Additional type changes --- .../types/callbacks/DialogueCallbacks.d.ts | 15 +++++++++- .../types/callbacks/GameCallbacks.d.ts | 9 ++++++ .../types/controllers/GameController.d.ts | 29 +++++++++++++++---- .../types/controllers/HealthController.d.ts | 6 +++- .../eft/dialog/IAcceptFriendRequestData.d.ts | 6 +++- 5 files changed, 56 insertions(+), 9 deletions(-) diff --git a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..b419a49 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -60,9 +60,22 @@ export declare class DialogueCallbacks implements OnUpdate { getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts index a1ce037..edda2ee 100644 --- a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts @@ -41,8 +41,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/match/group/current + */ getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index 8c1ef06..7beeab2 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -46,9 +46,26 @@ export declare class GameController { protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; - /** Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json */ - protected validateQuestAssortUnlocksExist(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -81,6 +98,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -95,8 +116,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/1LogToConsole/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; }