From 9bc08fbd2624a26c1561ee28ce95f5e1e55e3d23 Mon Sep 17 00:00:00 2001 From: Kaeno Date: Thu, 14 Mar 2024 22:41:36 +0000 Subject: [PATCH] Fix botcache not returning correct bot breaking halloween event. --- project/src/controllers/BotController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/src/controllers/BotController.ts b/project/src/controllers/BotController.ts index 90b8ce6c..42f740d0 100644 --- a/project/src/controllers/BotController.ts +++ b/project/src/controllers/BotController.ts @@ -294,7 +294,9 @@ export class BotController } // Construct cache key - const cacheKey = `${botGenerationDetails.role}${botGenerationDetails.botDifficulty}`; + const cacheKey = `${ + botGenerationDetails.eventRole ?? botGenerationDetails.role + }${botGenerationDetails.botDifficulty}`; // Check cache for bot using above key if (!this.botGenerationCacheService.cacheHasBotOfRole(cacheKey))