import { TradeController } from "https://deno.land/x/sptaki@1.2.0/controllers/TradeController.d.ts";
Constructors
new
TradeController(logger: ILogger,
databaseServer: DatabaseServer,
eventOutputHolder: EventOutputHolder,
tradeHelper: TradeHelper,
timeUtil: TimeUtil,
randomUtil: RandomUtil,
hashUtil: HashUtil,
itemHelper: ItemHelper,
profileHelper: ProfileHelper,
traderHelper: TraderHelper,
jsonUtil: JsonUtil,
ragfairServer: RagfairServer,
httpResponse: HttpResponseUtil,
localisationService: LocalisationService,
ragfairPriceService: RagfairPriceService,
mailSendService: MailSendService,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
databaseServer: DatabaseServerprotected
eventOutputHolder: EventOutputHolderprotected
hashUtil: HashUtilprotected
httpResponse: HttpResponseUtilprotected
itemHelper: ItemHelperprotected
jsonUtil: JsonUtilprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
mailSendService: MailSendServiceprotected
profileHelper: ProfileHelperprotected
ragfairConfig: IRagfairConfigprotected
ragfairPriceService: RagfairPriceServiceprotected
ragfairServer: RagfairServerprotected
randomUtil: RandomUtilprotected
timeUtil: TimeUtilprotected
tradeHelper: TradeHelperprotected
traderConfig: ITraderConfigprotected
traderHelper: TraderHelperMethods
protected
buyPmcItemFromRagfair(sessionId: string,
pmcData: IPmcData,
fleaOffer: IRagfairOffer,
requestOffer: IOfferRequest,
output: IItemEventRouterResponse,
Buy an item off the flea sold by a PMC
protected
buyTraderItemFromRagfair(sessionId: string,
pmcData: IPmcData,
fleaOffer: IRagfairOffer,
requestOffer: IOfferRequest,
output: IItemEventRouterResponse,
Buy an item off the flea sold by a trader
protected
getPriceOfItemAndChildren(parentItemId: string,
items: Item[],
handbookPrices: Record<string, number>,
traderDetails: ITraderBase,
Looks up an items children and gets total handbook price for them
protected
mailMoneyToPlayer(): voidSend the specified rouble total to player as mail
protected
playerLacksTraderLoyaltyLevelToBuyOffer(fleaOffer: IRagfairOffer, pmcData: IPmcData): booleanDoes Player have necessary trader loyalty to purchase flea offer
Handle RagFairBuyOffer event
Handle TradingConfirm event
Handle SellAllFromSavage event