import { RagfairPriceService } from "https://deno.land/x/sptaki@1.2.0/services/RagfairPriceService.d.ts";
Stores flea prices for items as well as methods to interact with them
Constructors
Properties
Methods
Check to see if an items price is below its handbook price and adjust according to values set to config/ragfair.json
using data from config, adjust an items price to be relative to its handbook price
Get the highest price for an item that is stored in handbook or trader assorts
Get different min/max price multipliers for different offer types (preset/pack/default)
Get the percentage difference between two values
Attempt to get the default preset for a weapon, failing that get the first preset in the array (assumes default = has encyclopedia entry)
Calculate the cost of a weapon preset by adding together the price of its mods + base price of default weapon preset
Multiply the price by a randomised curve where n = 2, shift = 2
Create a dictionary and store prices from prices.json in it
Iterate over all items of type "Item" in db and get template price, store in cache
Get prices for all items on flea, prioritize handbook prices first, use prices from prices.json if missing
Get the rouble price for an assorts barter scheme
Generate a currency cost for an item and its mods
get the dynamic (flea) price for an item Grabs prices from prices.json and stores in class if none currently exist
Get the dynamic price for an item. If value doesn't exist, use static (handbook) value. if no static value, return 1
Get the flea price for an offers items + children
Grab the static (handbook) for an item by its tplId
Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries