import { RagfairOfferService } from "https://deno.land/x/sptaki@1.2.0/services/mod.ts";
Constructors
new
RagfairOfferService(logger: ILogger,
timeUtil: TimeUtil,
databaseServer: DatabaseServer,
saveServer: SaveServer,
ragfairServerHelper: RagfairServerHelper,
profileHelper: ProfileHelper,
eventOutputHolder: EventOutputHolder,
httpResponse: HttpResponseUtil,
localisationService: LocalisationService,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
databaseServer: DatabaseServerprotected
eventOutputHolder: EventOutputHolderprotected
expiredOffers: Record<string, IRagfairOffer>Offer id + offer object
protected
httpResponse: HttpResponseUtilprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
profileHelper: ProfileHelperprotected
ragfairConfig: IRagfairConfigprotected
ragfairOfferHandler: RagfairOfferHolderprotected
ragfairServerHelper: RagfairServerHelperprotected
saveServer: SaveServerprotected
timeUtil: TimeUtilMethods
protected
processStaleOffer(staleOffer: IRagfairOffer): voidRemove stale offer from flea
protected
returnPlayerOffer(playerOffer: IRagfairOffer): voidaddOffer(offer: IRagfairOffer): void
addOfferToExpired(staleOffer: IRagfairOffer): void
addPlayerOffers(): void
doesOfferExist(offerId: string): boolean
Does the offer exist on the ragfair
expireStaleOffers(): void
getExpiredOfferAssorts(): Item[][]
Get an array of arrays of expired offer items + children
getExpiredOfferCount(): number
Get total count of current expired offers
getOfferByOfferId(offerId: string): IRagfairOffer
getOffers(): IRagfairOffer[]
Get all offers
getOffersOfType(templateId: string): IRagfairOffer[]
removeAllOffersByTrader(traderId: string): void
removeOfferById(offerId: string): void
Remove an offer from ragfair by offer id
removeOfferStack(offerId: string, amount: number): void
Reduce size of an offer stack by specified amount
resetExpiredOffers(): void
Clear out internal expiredOffers dictionary of all items
traderOffersNeedRefreshing(traderID: string): boolean
Do the trader offers on flea need to be refreshed