import { RagfairServerHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/mod.ts";
Helper class for common ragfair server actions
Constructors
new
RagfairServerHelper(logger: ILogger,
randomUtil: RandomUtil,
hashUtil: HashUtil,
timeUtil: TimeUtil,
saveServer: SaveServer,
databaseServer: DatabaseServer,
profileHelper: ProfileHelper,
itemHelper: ItemHelper,
localeService: LocaleService,
dialogueHelper: DialogueHelper,
traderHelper: TraderHelper,
jsonUtil: JsonUtil,
mailSendService: MailSendService,
itemFilterService: ItemFilterService,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
databaseServer: DatabaseServerprotected
dialogueHelper: DialogueHelperprotected
hashUtil: HashUtilprotected
itemFilterService: ItemFilterServiceprotected
itemHelper: ItemHelperprotected
jsonUtil: JsonUtilprotected
localeService: LocaleServiceprotected
logger: ILoggerprotected
mailSendService: MailSendServiceprotected
profileHelper: ProfileHelperprotected
questConfig: IQuestConfigprotected
ragfairConfig: IRagfairConfigprotected
randomUtil: RandomUtilprotected
saveServer: SaveServerprotected
timeUtil: TimeUtilprotected
traderHelper: TraderHelperMethods
protected
isItemCategoryOnCustomFleaBlacklist(itemParentId: string): booleanIs supplied parent id on the ragfair custom item category blacklist
protected
isItemOnCustomFleaBlacklist(itemTemplateId: string): booleanIs supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number
getDynamicOfferCurrency(): string
Choose a currency at random with bias
getMemberType(userID: string): MemberCategory
getNickname(userID: string): string
Get a player or traders nickname from their profile by their user id
getPresetItems(item: Item): Item[]
Given a preset id from globals.json, return an array of items[] with unique ids
getPresetItemsByTpl(item: Item): Item[]
Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean
Is item valid / on blacklist / quest item
isPlayer(userId: string): boolean
Is this user id the logged in player
isTrader(traderId: string): boolean
is supplied id a trader
returnItems(sessionID: string, returnedItems: Item[]): void
Send items back to player