Exit reward finding loop when reward pool is empty

This commit is contained in:
Dev 2023-11-19 10:52:50 +00:00
parent e99c1e8ab8
commit ee3096328e

View File

@ -937,6 +937,13 @@ export class RepeatableQuestGenerator
rewardItemPool = rewardItemPool.filter((x) =>
!this.itemHelper.isOfBaseclass(x._id, BaseClasses.WEAPON)
);
if (rewardItemPool.length === 0)
{
// No rewards left, break out of loop
break;
}
// Another weapon chosen, skip
continue;
}
let defaultPreset = this.presetHelper.getDefaultPreset(itemSelected._id);