Skip to main content
Deno 2 is finally here 🎉️
Learn more
class ProfileController
import { ProfileController } from "https://deno.land/x/sptaki@1.2.0/controllers/ProfileController.d.ts";

Constructors

new
ProfileController(
logger: ILogger,
hashUtil: HashUtil,
timeUtil: TimeUtil,
saveServer: SaveServer,
databaseServer: DatabaseServer,
itemHelper: ItemHelper,
profileFixerService: ProfileFixerService,
localisationService: LocalisationService,
seasonalEventService: SeasonalEventService,
mailSendService: MailSendService,
playerScavGenerator: PlayerScavGenerator,
eventOutputHolder: EventOutputHolder,
traderHelper: TraderHelper,
dialogueHelper: DialogueHelper,
questHelper: QuestHelper,
profileHelper: ProfileHelper,
)

Properties

protected
databaseServer: DatabaseServer
protected
dialogueHelper: DialogueHelper
protected
eventOutputHolder: EventOutputHolder
protected
hashUtil: HashUtil
protected
itemHelper: ItemHelper
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
mailSendService: MailSendService
protected
playerScavGenerator: PlayerScavGenerator
protected
profileFixerService: ProfileFixerService
protected
profileHelper: ProfileHelper
protected
questHelper: QuestHelper
protected
saveServer: SaveServer
protected
seasonalEventService: SeasonalEventService
protected
timeUtil: TimeUtil
protected
traderHelper: TraderHelper

Methods

protected
deleteProfileBySessionId(sessionID: string): void

Delete a profile

protected
givePlayerStartingQuestRewards(
profileDetails: IAkiProfile,
sessionID: string,
): void

Iterate over all quests in player profile, inspect rewards for the quests current state (accepted/completed) and send rewards to them in mail

protected
resetAllTradersInProfile(sessionID: string): void

For each trader reset their state to what a level 1 player would see

protected
updateInventoryEquipmentId(pmcData: IPmcData): void

make profiles pmcData.Inventory.equipment unique

changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string

Handle client/game/profile/nickname/change event Client allows player to adjust their profile name

changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void

Handle client/game/profile/voice/change event

createProfile(info: IProfileCreateRequestData, sessionID: string): string

Handle client/game/profile/create

generatePlayerScav(sessionID: string): IPmcData

Generate a player scav object PMC profile MUST exist first before pscav can be generated

getCompleteProfile(sessionID: string): IPmcData[]

Handle client/game/profile/list

Handle client/game/profile/search

getMiniProfile(sessionID: string): any

Handle launcher/profile/info

Handle /launcher/profiles

Handle client/profile/status

validateNickname(info: IValidateNicknameRequestData, sessionID: string): string

Handle client/game/profile/nickname/validate