From 35b1fd07b60d5bfc527831b9340aa224741d9c26 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 3 Nov 2024 11:02:27 +0000 Subject: [PATCH] Fixed PMC Victim responses killing profiles ability to view messages --- project/src/models/eft/common/tables/IBotBase.ts | 1 + project/src/services/PmcChatResponseService.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/project/src/models/eft/common/tables/IBotBase.ts b/project/src/models/eft/common/tables/IBotBase.ts index 79d38cf7..7078b2af 100644 --- a/project/src/models/eft/common/tables/IBotBase.ts +++ b/project/src/models/eft/common/tables/IBotBase.ts @@ -244,6 +244,7 @@ export interface IVictim { Level: number; Weapon: string; Role: string; + Location: string; } export interface ISessionCounters { diff --git a/project/src/services/PmcChatResponseService.ts b/project/src/services/PmcChatResponseService.ts index c8a94ffb..ea4a6e1a 100644 --- a/project/src/services/PmcChatResponseService.ts +++ b/project/src/services/PmcChatResponseService.ts @@ -199,7 +199,7 @@ export class PmcChatResponseService { * @param isVictim Was responder a victim of player * @returns true = should be stripped */ - appendSuffixToMessageEnd(isVictim: boolean): boolean { + protected appendSuffixToMessageEnd(isVictim: boolean): boolean { const chance = isVictim ? this.pmcResponsesConfig.victim.appendBroToMessageEndChancePercent : this.pmcResponsesConfig.killer.appendBroToMessageEndChancePercent; @@ -275,8 +275,8 @@ export class PmcChatResponseService { const chosenCategory = this.randomUtil.getArrayValue(categories); return { - _id: pmcVictim.Name, - aid: this.hashUtil.generateAccountId(), // TODO- pass correct value + _id: pmcVictim.ProfileId, + aid: Number.parseInt(pmcVictim.AccountId), Info: { Nickname: pmcVictim.Name, Level: pmcVictim.Level,