From cb253348a43f3662d94e86ae845e3c3486b15f3c Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 27 Dec 2024 10:50:51 +0000 Subject: [PATCH] Store exit taken on raid end and store in app context for future use --- project/src/models/eft/match/IEndLocalRaidRequestData.ts | 2 ++ project/src/services/LocationLifecycleService.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/project/src/models/eft/match/IEndLocalRaidRequestData.ts b/project/src/models/eft/match/IEndLocalRaidRequestData.ts index 8471db43..86326d95 100644 --- a/project/src/models/eft/match/IEndLocalRaidRequestData.ts +++ b/project/src/models/eft/match/IEndLocalRaidRequestData.ts @@ -39,6 +39,8 @@ export interface ILocationTransit { dayTime: string; /** The location player last visited */ sptLastVisitedLocation: string; + /** Name of exit taken */ + sptExitName?: string; } export interface ITransitProfile { diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index ac6a0ad5..2901caaf 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -367,6 +367,7 @@ export class LocationLifecycleService { request.locationTransit.sptLastVisitedLocation = locationName; // TODO - Persist each players last visited location history over multiple transits, e.g using InMemoryCacheService, need to take care to not let data get stored forever // Store transfer data for later use in `startLocalRaid()` when next raid starts + request.locationTransit.sptExitName = request.results.exitName; this.applicationContext.addValue(ContextVariableType.TRANSIT_INFO, request.locationTransit); }