Fixed BTR not delivering items
Fixed player scav being unable to transfer items via BTR
This commit is contained in:
parent
8baac2cfad
commit
a57ce79b45
@ -292,7 +292,7 @@ export class LocationLifecycleService {
|
|||||||
|
|
||||||
this.logger.debug(`Raid outcome: ${request.results.result}`);
|
this.logger.debug(`Raid outcome: ${request.results.result}`);
|
||||||
|
|
||||||
// Set flea interval time to out-of-raid value
|
// Reset flea interval time to out-of-raid value
|
||||||
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.outOfRaid;
|
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.outOfRaid;
|
||||||
this.hideoutConfig.runIntervalSeconds = this.hideoutConfig.runIntervalValues.outOfRaid;
|
this.hideoutConfig.runIntervalSeconds = this.hideoutConfig.runIntervalValues.outOfRaid;
|
||||||
|
|
||||||
@ -305,6 +305,9 @@ export class LocationLifecycleService {
|
|||||||
const isDead = this.isPlayerDead(request.results);
|
const isDead = this.isPlayerDead(request.results);
|
||||||
const isSurvived = this.isPlayerSurvived(request.results);
|
const isSurvived = this.isPlayerSurvived(request.results);
|
||||||
|
|
||||||
|
// Handle items transferred via BTR to player
|
||||||
|
this.handleBTRItemTransferEvent(sessionId, request);
|
||||||
|
|
||||||
if (!isPmc) {
|
if (!isPmc) {
|
||||||
this.handlePostRaidPlayerScav(sessionId, pmcProfile, scavProfile, isDead, request);
|
this.handlePostRaidPlayerScav(sessionId, pmcProfile, scavProfile, isDead, request);
|
||||||
|
|
||||||
@ -612,9 +615,6 @@ export class LocationLifecycleService {
|
|||||||
this.pmcChatResponseService.sendVictimResponse(sessionId, victims, pmcProfile);
|
this.pmcChatResponseService.sendVictimResponse(sessionId, victims, pmcProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle items transferred via BTR to player
|
|
||||||
this.handleBTRItemTransferEvent(sessionId, request);
|
|
||||||
|
|
||||||
this.handleInsuredItemLostEvent(sessionId, pmcProfile, request, locationName);
|
this.handleInsuredItemLostEvent(sessionId, pmcProfile, request, locationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -685,13 +685,13 @@ export class LocationLifecycleService {
|
|||||||
* @param request End raid request
|
* @param request End raid request
|
||||||
*/
|
*/
|
||||||
protected handleBTRItemTransferEvent(sessionId: string, request: IEndLocalRaidRequestData): void {
|
protected handleBTRItemTransferEvent(sessionId: string, request: IEndLocalRaidRequestData): void {
|
||||||
const btrKey = "BTRTransferStash";
|
let itemsToSend = request.transferItems[Traders.BTR] ?? [];
|
||||||
const btrContainerAndItems = request.transferItems[btrKey] ?? [];
|
if (itemsToSend.length === 0) {
|
||||||
if (btrContainerAndItems.length === 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemsToSend = btrContainerAndItems.filter((item) => item._id !== btrKey);
|
// Filter out the btr container item from transferred items before delivering
|
||||||
|
itemsToSend = itemsToSend.filter((item) => item._id !== Traders.BTR);
|
||||||
this.btrItemDelivery(sessionId, Traders.BTR, itemsToSend);
|
this.btrItemDelivery(sessionId, Traders.BTR, itemsToSend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user