Exit reward finding loop when reward pool is empty
This commit is contained in:
parent
e99c1e8ab8
commit
ee3096328e
@ -937,6 +937,13 @@ export class RepeatableQuestGenerator
|
|||||||
rewardItemPool = rewardItemPool.filter((x) =>
|
rewardItemPool = rewardItemPool.filter((x) =>
|
||||||
!this.itemHelper.isOfBaseclass(x._id, BaseClasses.WEAPON)
|
!this.itemHelper.isOfBaseclass(x._id, BaseClasses.WEAPON)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (rewardItemPool.length === 0)
|
||||||
|
{
|
||||||
|
// No rewards left, break out of loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Another weapon chosen, skip
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let defaultPreset = this.presetHelper.getDefaultPreset(itemSelected._id);
|
let defaultPreset = this.presetHelper.getDefaultPreset(itemSelected._id);
|
||||||
|
Loading…
Reference in New Issue
Block a user