import { RagfairOfferGenerator } from "https://deno.land/x/sptaki@1.2.0/generators/RagfairOfferGenerator.d.ts";
Constructors
Properties
Internal counter to ensure each offer created has a unique value for its intId property
Methods
Add missing conditions to an item if needed Durabiltiy for repairable items HpResource for medical items
Convert a count of currency into roubles
Calculate the offer price that's listed on the flea listing
Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
Create a random currency-based barter scheme for an array of items
Create an offer object ready to send to ragfairOfferService.addOffer()
Create one flea offer for a specific item
Get avatar url from trader table in db
Get the relevant condition id if item tpl matches in ragfair.json/condition
Get an array of flea prices + item tpl, cached in generator class inside allowedFleaPriceItemsForBarter
Get number of section until offer should expire
Get a flea trading rating for the passed in user
Is the offers user rating growing
Check userId, if its a player, return their pmc _id, otherwise return userId parameter
Randomise the durabiltiy values for an armors plates and soft inserts
Alter an items condition based on its item base type
Get array of an item with its mods + condition properties (e.g durability) Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
Adjust an items durability/maxDurability value
iterate over an items chidren and look for plates above desired level and remove them
Create a flea offer and store it in the Ragfair server offers array
Create multiple offers for items by using a unique list of items we've generated previously
Generate trader offers on flea using the traders assort data