0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Fixed issue with PMC post-raid messages not being sent

Caused by bot match cache regression resulting in bot data not being stored during generation
This commit is contained in:
Dev 2024-06-05 21:50:07 +01:00
parent 90b9fac842
commit 2a9cbab762
3 changed files with 6 additions and 3 deletions

View File

@ -343,7 +343,7 @@ export class BotController
}
/**
* Generate a single bot and store it in the cache
* Generate a single bot and store in the cache
* @param botGenerationDetails the bot details to generate the bot with
* @param sessionId Session id
* @param cacheKey the cache key to store the bot with
@ -357,6 +357,9 @@ export class BotController
{
const botToCache = this.botGenerator.prepareAndGenerateBot(sessionId, botGenerationDetails);
this.botGenerationCacheService.storeBots(cacheKey, [botToCache]);
// Store bot details in cache so post-raid PMC messages can use data
this.matchBotDetailsCacheService.cacheBot(botToCache);
}
/**

View File

@ -42,7 +42,7 @@ export class MatchBotDetailsCacheService
const botInCache = this.botDetailsCache[`${botName}${botSide}`];
if (!botInCache)
{
this.logger.warning(`bot not found in match bot cache: ${botName} ${botSide}`);
this.logger.warning(`bot not found in match bot cache: ${botName.toLowerCase()} ${botSide}`);
}
return botInCache;

View File

@ -83,7 +83,7 @@ export class PmcChatResponseService
// find bot by name in cache
const killerDetailsInCache = this.matchBotDetailsCacheService.getBotByNameAndSide(
killer.Name.trim(),
killer.Name,
killer.Side,
);
if (!killerDetailsInCache)