From 8cb48330017552f9a7a40dbd3a49c2ed4346df56 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 19 Nov 2023 10:54:06 +0000 Subject: [PATCH] Fix reward creatio code giving 1 extra reward compared to what was specified --- project/src/generators/RepeatableQuestGenerator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index 8df595ac..ecbe4338 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -910,7 +910,7 @@ export class RepeatableQuestGenerator if (rewardItemPool.length > 0) { let weaponRewardCount = 0; - for (let i = 0; i < rewardNumItems; i++) + for (let i = 0; i < rewardNumItems - 1; i++) { let itemCount = 1; let children: Item[] = null; @@ -943,6 +943,7 @@ export class RepeatableQuestGenerator // No rewards left, break out of loop break; } + // Another weapon chosen, skip continue; }