import { TraderPurchasePersisterService } from "https://deno.land/x/sptaki@1.2.0/services/mod.ts";
Help with storing limited item purchases from traders in profile to persist them over server restarts
Methods
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