From c8fa31184fce282c4b47946ffe5805b8f4a48f7c Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 18 Jan 2024 12:20:28 +0000 Subject: [PATCH] Prevent gifter bot being added twice --- project/src/services/SeasonalEventService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/src/services/SeasonalEventService.ts b/project/src/services/SeasonalEventService.ts index e562524e..f1aceb72 100644 --- a/project/src/services/SeasonalEventService.ts +++ b/project/src/services/SeasonalEventService.ts @@ -525,6 +525,12 @@ export class SeasonalEventService for (const gifterMapSettings of gifterSettings) { const mapData: ILocationData = maps[gifterMapSettings.map]; + // Dont add gifter to map twice + if (mapData.base.BossLocationSpawn.some(boss => boss.BossName === "gifter")) + { + continue; + } + mapData.base.BossLocationSpawn.push({ BossName: "gifter", BossChance: gifterMapSettings.spawnChance,