import { ScavCaseRewardGenerator } from "https://deno.land/x/sptaki@1.2.0/generators/ScavCaseRewardGenerator.d.ts";
Handle the creation of randomised scav case rewards
Constructors
Properties
Methods
Get all db items that are not blacklisted in scavcase config or global blacklist Store in class field
Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config
Randomises the size of ammo and money stacks
Choose from rouble/dollar/euro at random
Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object
Pick a number of items to be rewards, the count is defined by the values in itemFilters
param
Take all the rewards picked create the Product object array ready to return to calling code Also add a stack count to ammo and money
Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig
Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig