From 85e86b969daca0daab0bf37a4d630fb3059dec42 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 5 Jul 2024 10:48:13 +0100 Subject: [PATCH] Expanded request object + method info --- project/src/controllers/MatchController.ts | 22 +++++++++++++++---- .../eft/match/IEndLocalRaidRequestData.ts | 3 +++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/project/src/controllers/MatchController.ts b/project/src/controllers/MatchController.ts index 727c2040..18c7e8d3 100644 --- a/project/src/controllers/MatchController.ts +++ b/project/src/controllers/MatchController.ts @@ -355,11 +355,12 @@ export class MatchController public startLocalRaid(sessionId: string, request: IStartLocalRaidRequestData): IStartLocalRaidResponseData { + // TODO - remove usage of locationController - controller use inside match controller = bad const playerProfile = this.profileHelper.getPmcProfile(sessionId); const result: IStartLocalRaidResponseData = { - serverId: "spt", - serverSettings: this.databaseService.getLocationServices(), + serverId: this.hashUtil.generate(), // TODO - does this need to be more verbose - investigate client? + serverSettings: this.databaseService.getLocationServices(), // TODO - is this per map or global? profile: { insuredItems: playerProfile.InsuredItems }, locationLoot: this.locationController.generate(request.location), }; @@ -367,8 +368,21 @@ export class MatchController return result; } - public endLocalRaid(sessionId: string, info: IEndLocalRaidRequestData): void + public endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void { - throw new Error("Method not implemented."); + const playerProfile = this.profileHelper.getPmcProfile(sessionId); + + // TODO: + // Update profile + // Handle insurance + // Rep gain/loss? + // Quest status? + // Counters? + // Send PMC message to player if necessary + // Limb health + // Limb effects + // Skills + // Inventory + // Stats } } diff --git a/project/src/models/eft/match/IEndLocalRaidRequestData.ts b/project/src/models/eft/match/IEndLocalRaidRequestData.ts index 172fee81..eca97396 100644 --- a/project/src/models/eft/match/IEndLocalRaidRequestData.ts +++ b/project/src/models/eft/match/IEndLocalRaidRequestData.ts @@ -1,10 +1,13 @@ import { ExitStatus } from "@spt/models/enums/ExitStatis"; import { IPmcData } from "../common/IPmcData"; +import { Item } from "../common/tables/IItem"; export interface IEndLocalRaidRequestData { serverId: string result: IEndRaidResult + lostInsuredItems: Item[] + transferItems: Record } export interface IEndRaidResult