Fix reward creatio code giving 1 extra reward compared to what was specified

This commit is contained in:
Dev 2023-11-19 10:54:06 +00:00
parent ee3096328e
commit 8cb4833001

View File

@ -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;
}