import { TraderPurchasePersisterService } from "https://deno.land/x/sptaki@1.2.0/services/TraderPurchasePersisterService.d.ts";
Help with storing limited item purchases from traders in profile to persist them over server restarts
Constructors
new
TraderPurchasePersisterService(logger: ILogger,
timeUtil: TimeUtil,
randomUtil: RandomUtil,
profileHelper: ProfileHelper,
localisationService: LocalisationService,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
profileHelper: ProfileHelperprotected
randomUtil: RandomUtilprotected
timeUtil: TimeUtilprotected
traderConfig: ITraderConfigMethods
getProfileTraderPurchase(): TraderPurchaseData
sessionId: string,
traderId: string,
assortId: string,
Get a purchase made from a trader for requested profile before the last trader reset
getProfileTraderPurchases(sessionId: string, traderId: string): Record<string, TraderPurchaseData>
Get the purchases made from a trader for this profile before the last trader reset
removeStalePurchasesFromProfiles(traderId: string): void
Iterate over all server profiles and remove specific trader purchase data that has passed the trader refesh time
resetTraderPurchasesStoredInProfile(traderId: string): void
Remove all trader purchase records from all profiles that exist