Update types

This commit is contained in:
Dev 2023-07-16 11:01:53 +01:00
parent 421120f623
commit 622ab3fbc2
76 changed files with 542 additions and 156 deletions

View File

@ -13,6 +13,9 @@ export declare class BundleCallbacks {
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
/**
* Handle singleplayer/bundles
*/
getBundles(url: string, info: any, sessionID: string): string;
getBundle(url: string, info: any, sessionID: string): string;
}

View File

@ -15,15 +15,21 @@ export declare class CustomizationCallbacks {
protected httpResponse: HttpResponseUtil;
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
/**
* Handles client/trading/customization/storage
* @returns
* Handle client/trading/customization/storage
* @returns IGetSuitsResponse
*/
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
/**
* Handles client/trading/customization
* Handle client/trading/customization
* @returns ISuit[]
*/
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
/**
* Handle CustomizationWear event
*/
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle CustomizationBuy event
*/
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -4,7 +4,6 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGlobals } from "../models/eft/common/IGlobals";
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
import { IQuest } from "../models/eft/common/tables/IQuest";
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
@ -24,42 +23,54 @@ export declare class DataCallbacks {
protected hideoutController: HideoutController;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
/**
* Handles client/settings
* Handle client/settings
* @returns ISettingsBase
*/
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
/**
* Handles client/globals
* Handle client/globals
* @returns IGlobals
*/
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
/**
* Handles client/items
* Handle client/items
* @returns string
*/
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
/**
* Handles client/handbook/templates
* Handle client/handbook/templates
* @returns IHandbookBase
*/
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
/**
* Handles client/customization
* Handle client/customization
* @returns Record<string, ICustomizationItem
*/
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
/**
* Handles client/account/customization
* Handle client/account/customization
* @returns string[]
*/
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
/**
* Handle client/hideout/settings
* @returns IHideoutSettingsBase
*/
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
/**
* Handle client/languages
*/
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
/**
* Handle client/menu/locale
*/
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/locale
*/
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
/**
* Handle client/hideout/qte/list

View File

@ -1,7 +1,7 @@
import { DialogueController } from "../controllers/DialogueController";
import { OnUpdate } from "../di/OnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData";
import { IChatServer } from "../models/eft/dialog/IChatServer";
import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest";
import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest";
@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate {
protected dialogueController: DialogueController;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
/**
* Handles client/friend/list
* Handle client/friend/list
* @returns IGetFriendListDataResponse
*/
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
/**
* Handles client/chatServer/list
* @returns
* Handle client/chatServer/list
* @returns IChatServer[]
*/
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
/** Handle client/mail/dialog/list */
@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate {
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
/** Handle client/mail/dialog/remove */
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/** Handle client/mail/dialog/pin */
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/** Handle client/mail/dialog/unpin */
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/** Handle client/mail/dialog/read */
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/**
* Handles client/mail/dialog/getAllAttachments
* Handle client/mail/dialog/getAllAttachments
* @returns IGetAllAttachmentsResponse
*/
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
/** Handle client/mail/msg/send */
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<string>;
/** Handle client/friend/request/list/outbox */
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/**
* Handle client/friend/request/list/inbox
*/
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
/**
* Handle client/friend/request/send
*/
sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData<IFriendRequestSendResponse>;
/**
* Handle client/friend/request/accept
*/
acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
/**
* Handle client/friend/request/cancel
*/
cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/friend/delete */
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
/** Handle client/friend/ignore/set */
ignoreFriend(url: string, request: {
uid: string;
}, sessionID: string): any;
/** Handle client/friend/ignore/set */
unIgnoreFriend(url: string, request: {
uid: string;
}, sessionID: string): any;
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
onUpdate(timeSinceLastRun: number): Promise<boolean>;

View File

@ -41,8 +41,17 @@ declare class GameCallbacks {
* @returns IGameConfigResponse
*/
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
/**
* Handle client/server/list
*/
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
/**
* Handle client/match/group/current
*/
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any;
/**
* Handle client/checkVersion
*/
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
/**
* Handle client/game/keepalive

View File

@ -23,11 +23,11 @@ export declare class HideoutCallbacks implements OnUpdate {
constructor(hideoutController: HideoutController, // TODO: delay needed
configServer: ConfigServer);
/**
* Handle HideoutUpgrade
* Handle HideoutUpgrade event
*/
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutUpgradeComplete
* Handle HideoutUpgradeComplete event
*/
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
/**
@ -35,19 +35,19 @@ export declare class HideoutCallbacks implements OnUpdate {
*/
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeItemsFromAreaSlots
* Handle HideoutTakeItemsFromAreaSlots event
*/
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutToggleArea
* Handle HideoutToggleArea event
*/
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutSingleProductionStart
* Handle HideoutSingleProductionStart event
*/
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutScavCaseProductionStart
* Handle HideoutScavCaseProductionStart event
*/
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
@ -55,7 +55,7 @@ export declare class HideoutCallbacks implements OnUpdate {
*/
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeProduction
* Handle HideoutTakeProduction event
*/
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**

View File

@ -12,6 +12,7 @@ export declare class InraidCallbacks {
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
/**
* Handle client/location/getLocalloot
* Store active map in profile + applicationContext
* @param url
* @param info register player request
* @param sessionID Session id

View File

@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate {
*/
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
/**
* Handle Insure
* Handle Insure event
* @returns IItemEventRouterResponse
*/
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -26,16 +26,20 @@ export declare class InventoryCallbacks {
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle Swap */
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle ReadEncyclopedia */
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle ApplyInventoryChanges */
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle OpenRandomLootContainer */
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -9,7 +9,10 @@ export declare class LocationCallbacks {
protected httpResponse: HttpResponseUtil;
protected locationController: LocationController;
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
/** Handle client/locations */
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
/** Handle client/location/getLocalloot */
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
/** Handle client/location/getAirdropLoot */
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
}

View File

@ -27,11 +27,14 @@ export declare class MatchCallbacks {
protected matchController: MatchController;
protected databaseServer: DatabaseServer;
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
/** Handle client/match/updatePing */
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
/** Handle client/match/group/exit_from_menu */
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
/** Handle client/match/group/invite/send */
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
/** Handle client/match/group/invite/accept */
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
@ -39,21 +42,30 @@ export declare class MatchCallbacks {
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/transfer */
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/invite/cancel-all */
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
/** Handle raid/profile/list */
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle match/group/start_game */
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
/** Handle client/getMetricsConfig */
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/match/group/status
* @returns
*/
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
/** Handle client/match/group/create */
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
/** Handle client/match/group/delete */
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
/** Handle client/match/group/player/remove */
removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData;
/** Handle client/match/offline/end */
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
/** Handle client/raid/configuration */
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
}

View File

@ -5,7 +5,10 @@ import { INoteActionData } from "../models/eft/notes/INoteActionData";
export declare class NoteCallbacks {
protected noteController: NoteController;
constructor(noteController: NoteController);
/** Handle AddNote event */
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
/** Handle EditNote event */
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
/** Handle DeleteNote event */
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -18,7 +18,10 @@ export declare class NotifierCallbacks {
* and the client would abort the connection due to spam.
*/
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
/** Handle push/notifier/get */
/** Handle push/notifier/getwebsocket */
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
/** Handle client/notifier/channel/create */
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
/**
* Handle client/game/profile/select

View File

@ -10,7 +10,10 @@ export declare class PresetBuildCallbacks {
protected httpResponse: HttpResponseUtil;
protected presetBuildController: PresetBuildController;
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
/** Handle client/handbook/builds/my/list */
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
/** Handle SaveBuild event */
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RemoveBuild event*/
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -20,16 +20,17 @@ export declare class ProfileCallbacks {
protected timeUtil: TimeUtil;
protected profileController: ProfileController;
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
/**
* Handle client/game/profile/create
*/
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
/**
* Handle client/game/profile/list
* Get the complete player profile (scav + pmc character)
* @param url
* @param info Empty
* @param sessionID Session id
* @returns Profile object
*/
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
/**
* Handle client/game/profile/savage/regenerate
* Handle the creation of a scav profile for player
* Occurs post-raid and when profile first created immediately after character details are confirmed by player
* @param url
@ -40,33 +41,40 @@ export declare class ProfileCallbacks {
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
/**
* Handle client/game/profile/voice/change event
* @param url
* @param info Change voice request object
* @param sessionID Session id
* @returns Client response
*/
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
/**
* Handle client/game/profile/nickname/change event
* Client allows player to adjust their profile name
* @param url
* @param info Change nickname request object
* @param sessionID Session id
* @returns client response
*/
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
/**
* Handle client/game/profile/nickname/validate
*/
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
/**
* Handle client/game/profile/nickname/reserved
*/
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
/**
* Handle client/profile/status
* Called when creating a character when choosing a character face/voice
* @param url
* @param info response (empty)
* @param sessionID
* @returns
*/
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
/**
* Handle client/profile/settings
*/
getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData<string>;
/**
* Handle client/game/profile/search
*/
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
/**
* Handle launcher/profile/info
*/
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
/**
* Handle /launcher/profiles
*/
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
}

View File

@ -17,17 +17,28 @@ export declare class QuestCallbacks {
protected questController: QuestController;
protected repeatableQuestController: RepeatableQuestController;
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
/**
* Handle RepeatableQuestChange event
*/
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
/**
* Handle QuestAccept event
*/
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle QuestComplete event
*/
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle QuestHandover event
*/
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle client/quest/list
* @param url
* @param info
* @param sessionID
* @returns
*/
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
/**
* Handle client/repeatalbeQuests/activityPeriods
*/
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
}

View File

@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate {
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
onLoad(): Promise<void>;
getRoute(): string;
onUpdate(timeSinceLastRun: number): Promise<boolean>;
/**
* Handle client/ragfair/search
* Handle client/ragfair/find
*/
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
/** Handle client/ragfair/itemMarketPrice */
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
/** Handle RagFairAddOffer event */
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
/** \Handle RagFairRemoveOffer event */
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RagFairRenewOffer event */
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle /client/items/prices
* Called when clicking an item to list on flea
*/
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
onUpdate(timeSinceLastRun: number): Promise<boolean>;
/** Handle client/reports/ragfair/send */
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
}

View File

@ -7,19 +7,21 @@ export declare class RepairCallbacks {
protected repairController: RepairController;
constructor(repairController: RepairController);
/**
* Handle TraderRepair event
* use trader to repair item
* @param pmcData
* @param body
* @param sessionID
* @returns
* @param pmcData Player profile
* @param traderRepairRequest Request object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
traderRepair(pmcData: IPmcData, traderRepairRequest: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
/**
* Handle Repair event
* Use repair kit to repair item
* @param pmcData
* @param body
* @param sessionID
* @returns
* @param pmcData Player profile
* @param repairRequest Request object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
repair(pmcData: IPmcData, repairRequest: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
}

View File

@ -7,8 +7,9 @@ export declare class TradeCallbacks {
protected tradeController: TradeController;
constructor(tradeController: TradeController);
/**
* Handle client/game/profile/items/moving TradingConfirm
* Handle client/game/profile/items/moving TradingConfirm event
*/
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RagFairBuyOffer event */
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate {
onLoad(): Promise<void>;
onUpdate(): Promise<boolean>;
getRoute(): string;
/** Handle client/trading/api/traderSettings */
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
/** Handle client/trading/api/getTrader */
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
/** Handle client/trading/api/getTraderAssort */
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
}

View File

@ -5,6 +5,8 @@ import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"
export declare class WishlistCallbacks {
protected wishlistController: WishlistController;
constructor(wishlistController: WishlistController);
/** Handle AddToWishList event */
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
/** Handle RemoveFromWishList event */
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -38,6 +38,7 @@ export declare class BotController {
*/
getBotPresetGenerationLimit(type: string): number;
/**
* Handle singleplayer/settings/bot/difficulty
* Get the core.json difficulty settings from database\bots
* @returns IBotCore
*/

View File

@ -28,9 +28,13 @@ export declare class CustomizationController {
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
/**
* Handle CustomizationWear event
* Equip one to many clothing items to player
*/
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle CustomizationBuy event
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
@ -42,8 +46,8 @@ export declare class CustomizationController {
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true if purchased already
* @param sessionID Session id of profile to check for clothing in
* @returns true if already purchased
*/
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/**
@ -60,7 +64,6 @@ export declare class CustomizationController {
* @param pmcData Player profile
* @param clothingItem Clothing item purchased
* @param output Client response
* @returns
*/
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
protected getAllTraderSuits(sessionID: string): ISuit[];

View File

@ -1,8 +1,10 @@
import { DialogueHelper } from "../helpers/DialogueHelper";
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
import { DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
import { SaveServer } from "../servers/SaveServer";
import { TimeUtil } from "../utils/TimeUtil";
export declare class DialogueController {
@ -10,9 +12,15 @@ export declare class DialogueController {
protected timeUtil: TimeUtil;
protected dialogueHelper: DialogueHelper;
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
/** Handle onUpdate spt event */
update(): void;
/**
* Handle client/friend/list
* @returns IGetFriendListDataResponse
*/
getFriendList(sessionID: string): IGetFriendListDataResponse;
/**
* Handle client/mail/dialog/list
* Create array holding trader dialogs and mail interactions with player
* Set the content of the dialogue on the list tab.
* @param sessionID Session Id
@ -27,14 +35,22 @@ export declare class DialogueController {
*/
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
/**
* Handle client/mail/dialog/view
* Handle player clicking 'messenger' and seeing all the messages they've recieved
* Set the content of the dialogue on the details panel, showing all the messages
* for the specified dialogue.
* @param dialogueID Dialog id
* @param sessionID Session id
* @param request Get dialog request
* @param sessionId Session id
* @returns IGetMailDialogViewResponseData object
*/
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
generateDialogueView(request: IGetMailDialogViewRequestData, sessionId: string): IGetMailDialogViewResponseData;
/**
* Get dialog from player profile, create if doesn't exist
* @param profile Player profile
* @param request get dialog request (params used when dialog doesnt exist in profile)
* @returns Dialogue
*/
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[];
/**
* Get a count of messages with attachments from a particular dialog
@ -49,16 +65,21 @@ export declare class DialogueController {
* @returns true if uncollected rewards found
*/
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
/** Handle client/mail/dialog/remove */
removeDialogue(dialogueID: string, sessionID: string): void;
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
/** Handle client/mail/dialog/read */
setRead(dialogueIDs: string[], sessionID: string): void;
/**
* Handle client/mail/dialog/getAllAttachments
* Get all uncollected items attached to mail in a particular dialog
* @param dialogueID Dialog to get mail attachments from
* @param sessionID Session id
* @returns
*/
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
/** client/mail/msg/send */
sendMessage(sessionId: string, request: ISendMessageRequest): string;
/**
* Get messages from a specific dialog that have items not expired
* @param sessionId Session id

View File

@ -8,6 +8,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
@ -46,7 +47,30 @@ export declare class GameController {
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
/**
* Handle client/game/start
*/
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/**
* Handle client/game/config
*/
getGameConfig(sessionID: string): IGameConfigResponse;
/**
* Handle client/server/list
*/
getServer(sessionId: string): IServerDetails[];
/**
* Handle client/match/group/current
*/
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
/**
* Handle client/checkVersion
*/
getValidGameVersion(sessionId: string): ICheckVersionResponse;
/**
* Handle client/game/keepalive
*/
getKeepAlive(sessionId: string): IGameKeepAliveResponse;
/**
* BSG have two values for shotgun dispersion, we make sure both have the same value
*/
@ -79,6 +103,10 @@ export declare class GameController {
* @param fullProfile Profile to add mod details to
*/
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
/**
* Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json
*/
protected validateQuestAssortUnlocksExist(): void;
/**
* Add the logged in players name to PMC name pool
* @param pmcProfile
@ -93,8 +121,4 @@ export declare class GameController {
*/
protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): IServerDetails[];
getCurrentGroup(sessionId: string): ICurrentGroupResponse;
getValidGameVersion(): ICheckVersionResponse;
}

View File

@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { LocalisationService } from "../services/LocalisationService";
import { PaymentService } from "../services/PaymentService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class HealthController {
protected logger: ILogger;
@ -21,8 +22,9 @@ export declare class HealthController {
protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper;
protected localisationService: LocalisationService;
protected httpResponse: HttpResponseUtil;
protected healthHelper: HealthHelper;
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper);
/**
* stores in-raid player health
* @param pmcData Player profile
@ -40,6 +42,7 @@ export declare class HealthController {
*/
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle Eat event
* Consume food/water outside of a raid
* @param pmcData Player profile
* @param body request Object
@ -48,6 +51,7 @@ export declare class HealthController {
*/
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle RestoreHealth event
* Occurs on post-raid healing page
* @param pmcData player profile
* @param healthTreatmentRequest Request data from client

View File

@ -59,6 +59,7 @@ export declare class HideoutController {
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
/**
* Handle HideoutUpgrade event
* Start a hideout area upgrade
* @param pmcData Player profile
* @param request upgrade start request
@ -67,6 +68,7 @@ export declare class HideoutController {
*/
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutUpgradeComplete event
* Complete a hideout area upgrade
* @param pmcData Player profile
* @param request Completed upgrade request
@ -84,6 +86,7 @@ export declare class HideoutController {
*/
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeItemsFromAreaSlots event
* Remove item from hideout area and place into player inventory
* @param pmcData Player profile
* @param request Take item out of area request
@ -102,6 +105,7 @@ export declare class HideoutController {
*/
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
/**
* Handle HideoutToggleArea event
* Toggle area on/off
* @param pmcData Player profile
* @param request Toggle area request
@ -110,6 +114,7 @@ export declare class HideoutController {
*/
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutSingleProductionStart event
* Start production for an item from hideout area
* @param pmcData Player profile
* @param body Start prodution of single item request
@ -118,6 +123,7 @@ export declare class HideoutController {
*/
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutScavCaseProductionStart event
* Handles event after clicking 'start' on the scav case hideout page
* @param pmcData player profile
* @param body client request object
@ -149,6 +155,7 @@ export declare class HideoutController {
*/
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeProduction event
* Take completed item out of hideout area and place into player inventory
* @param pmcData Player profile
* @param request Remove production from area request

View File

@ -52,6 +52,7 @@ export declare class InraidController {
*/
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
/**
* Handle raid/profile/save
* Save profile state to disk
* Handles pmc/pscav
* @param offraidData post-raid request data

View File

@ -45,6 +45,7 @@ export declare class InsuranceController {
*/
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
/**
* Handle Insure event
* Add insurance to an item
* @param pmcData Player profile
* @param body Insurance request
@ -53,6 +54,7 @@ export declare class InsuranceController {
*/
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle client/insurance/items/list/cost
* Calculate insurance cost
* @param info request object
* @param sessionID session id

View File

@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { PaymentHelper } from "../helpers/PaymentHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
@ -44,6 +45,7 @@ export declare class InventoryController {
protected fenceService: FenceService;
protected presetHelper: PresetHelper;
protected inventoryHelper: InventoryHelper;
protected questHelper: QuestHelper;
protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper;
@ -51,7 +53,7 @@ export declare class InventoryController {
protected lootGenerator: LootGenerator;
protected eventOutputHolder: EventOutputHolder;
protected httpResponseUtil: HttpResponseUtil;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
/**
* Move Item
* change location of item with parentId and slotId
@ -187,6 +189,7 @@ export declare class InventoryController {
*/
protected sanitiseMapMarkerText(mapNoteText: string): string;
/**
* Handle OpenRandomLootContainer event
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
* @param pmcData Profile data
* @param body open loot container request data

View File

@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { ILocationBase } from "../models/eft/common/ILocationBase";
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult";
import { AirdropTypeEnum } from "../models/enums/AirdropType";
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
import { LootItem } from "../models/spt/services/LootItem";
import { LootRequest } from "../models/spt/services/LootRequest";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
@ -27,19 +27,27 @@ export declare class LocationController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
get(location: string): ILocationBase;
generate(name: string): ILocationBase;
/**
* Handle client/location/getLocalloot
* Get a location (map) with generated loot data
* @param location Map to generate loot for
* @returns ILocationBase
*/
get(location: string): ILocationBase;
private generate;
/**
* Handle client/locations
* Get all maps base location properties without loot data
* @returns ILocationsGenerateAllResponse
*/
generateAll(): ILocationsGenerateAllResponse;
/**
* Handle client/location/getAirdropLoot
* Get loot for an airdop container
* Generates it randomly based on config/airdrop.json values
* @returns Array of LootItem objects
*/
getAirdropLoot(): LootItem[];
getAirdropLoot(): IAirdropLootResult;
/**
* Randomly pick a type of airdrop loot using weighted values from config
* @returns airdrop type value

View File

@ -35,15 +35,20 @@ export declare class MatchController {
protected botConfig: IBotConfig;
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
getEnabled(): boolean;
/** Handle raid/profile/list */
getProfile(info: IGetProfileRequestData): IPmcData[];
/** Handle client/match/group/create */
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
/** Handle client/match/group/delete */
deleteGroup(info: any): void;
/** Handle match/group/start_game */
joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult;
/** Handle client/match/group/status */
getGroupStatus(info: IGetGroupStatusRequestData): any;
/**
* Handle /client/raid/configuration
* @param request
* @param sessionID
* @param request Raid config request
* @param sessionID Session id
*/
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
/**
@ -52,6 +57,7 @@ export declare class MatchController {
* @returns bot difficulty
*/
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
/** Handle client/match/offline/end */
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
/**
* Is extract by car

View File

@ -18,5 +18,6 @@ export declare class NotifierController {
*/
notifyAsync(sessionID: string): Promise<unknown>;
getServer(sessionID: string): string;
/** Handle client/notifier/channel/create */
getChannel(sessionID: string): INotifierChannel;
}

View File

@ -12,7 +12,10 @@ export declare class PresetBuildController {
protected itemHelper: ItemHelper;
protected saveServer: SaveServer;
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
/** Handle client/handbook/builds/my/list */
getUserBuilds(sessionID: string): WeaponBuild[];
/** Handle SaveBuild event */
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RemoveBuild event*/
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -14,6 +14,7 @@ import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateR
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
@ -21,6 +22,7 @@ import { ProfileFixerService } from "../services/ProfileFixerService";
import { HashUtil } from "../utils/HashUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class ProfileController {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected saveServer: SaveServer;
@ -33,21 +35,63 @@ export declare class ProfileController {
protected dialogueHelper: DialogueHelper;
protected questHelper: QuestHelper;
protected profileHelper: ProfileHelper;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
/**
* Handle /launcher/profiles
*/
getMiniProfiles(): IMiniProfile[];
/**
* Handle launcher/profile/info
*/
getMiniProfile(sessionID: string): any;
/**
* Handle client/game/profile/list
*/
getCompleteProfile(sessionID: string): IPmcData[];
/**
* Handle client/game/profile/create
*/
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
/**
* Delete a profile
* @param sessionID Id of profile to delete
*/
protected deleteProfileBySessionId(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
* @param profileDetails Player profile
* @param sessionID Session id
* @param response Event router response
*/
protected givePlayerStartingQuestRewards(profileDetails: IAkiProfile, sessionID: string, response: IItemEventRouterResponse): void;
/**
* For each trader reset their state to what a level 1 player would see
* @param sessionID Session id of profile to reset
*/
protected resetAllTradersInProfile(sessionID: string): void;
/**
* Generate a player scav object
* pmc profile MUST exist first before pscav can be generated
* PMC profile MUST exist first before pscav can be generated
* @param sessionID
* @returns IPmcData object
*/
generatePlayerScav(sessionID: string): IPmcData;
/**
* Handle client/game/profile/nickname/validate
*/
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
/**
* Handle client/game/profile/nickname/change event
* Client allows player to adjust their profile name
*/
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
/**
* Handle client/game/profile/voice/change event
*/
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
/**
* Handle client/game/profile/search
*/
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
}

View File

@ -19,6 +19,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { LocaleService } from "../services/LocaleService";
import { LocalisationService } from "../services/LocalisationService";
import { PlayerService } from "../services/PlayerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class QuestController {
@ -34,17 +35,32 @@ export declare class QuestController {
protected questConditionHelper: QuestConditionHelper;
protected playerService: PlayerService;
protected localeService: LocaleService;
protected seasonalEventService: SeasonalEventService;
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Handle client/quest/list
* Get all quests visible to player
* Exclude quests with incomplete preconditions (level/loyalty)
* @param sessionID session id
* @returns array of IQuest
*/
getClientQuests(sessionID: string): IQuest[];
/**
* Does a provided quest have a level requirement equal to or below defined level
* @param quest Quest to check
* @param playerLevel level of player to test against quest
* @returns true if quest can be seen/accepted by player of defined level
*/
protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean;
/**
* Should a quest be shown to the player in trader quest screen
* @param questId Quest to check
* @returns true = show to player
*/
protected showEventQuestToPlayer(questId: string): boolean;
/**
* Is the quest for the opposite side the player is on
* @param playerSide Player side (usec/bear)
@ -52,6 +68,7 @@ export declare class QuestController {
*/
protected questIsForOtherSide(playerSide: string, questId: string): boolean;
/**
* Handle QuestAccept event
* Handle the client accepting a quest and starting it
* Send starting rewards if any to player and
* Send start notification if any to player
@ -79,9 +96,10 @@ export declare class QuestController {
*/
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
/**
* Handle QuestComplete event
* Update completed quest in profile
* Add newly unlocked quests to profile
* Also recalculate thier level due to exp rewards
* Also recalculate their level due to exp rewards
* @param pmcData Player profile
* @param body Completed quest request
* @param sessionID Session id
@ -118,7 +136,7 @@ export declare class QuestController {
*/
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
/**
*
* Handle QuestHandover event
* @param pmcData Player profile
* @param handoverQuestRequest handover item request
* @param sessionID Session id

View File

@ -23,6 +23,7 @@ export declare class RepairController {
protected repairConfig: IRepairConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
/**
* Handle TraderRepair event
* Repair with trader
* @param sessionID session id
* @param body endpoint request data
@ -31,6 +32,7 @@ export declare class RepairController {
*/
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
/**
* Handle Repair event
* Repair with repair kit
* @param sessionID session id
* @param body endpoint request data

View File

@ -77,7 +77,7 @@ export declare class RepeatableQuestController {
protected questConfig: IQuestConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
/**
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
* Handle client/repeatalbeQuests/activityPeriods
* Returns an array of objects in the format of repeatable quests to the client.
* repeatableQuestObject = {
* id: Unique Id,
@ -113,7 +113,7 @@ export declare class RepeatableQuestController {
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
*/
generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
/**
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
*/
@ -128,7 +128,7 @@ export declare class RepeatableQuestController {
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
* (needs to be filled with reward and conditions by called to make a valid quest)
*/
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
protected generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
/**
* Generates a valid Exploration quest
*
@ -138,7 +138,7 @@ export declare class RepeatableQuestController {
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
*/
generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
/**
* Generates a valid Completion quest
*
@ -147,7 +147,7 @@ export declare class RepeatableQuestController {
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
*/
generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
/**
* Generates a valid Elimination quest
*
@ -157,7 +157,7 @@ export declare class RepeatableQuestController {
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
*/
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
/**
* Get the relevant elimination config based on the current players PMC level
* @param pmcLevel Level of PMC character
@ -178,7 +178,7 @@ export declare class RepeatableQuestController {
* @param {string} exit The exit name to generate the condition for
* @returns {object} Exit condition
*/
generateExplorationExitCondition(exit: Exit): IExplorationCondition;
protected generateExplorationExitCondition(exit: Exit): IExplorationCondition;
/**
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
@ -187,7 +187,7 @@ export declare class RepeatableQuestController {
* @param {integer} value amount of items of this specific type to request
* @returns {object} object of "Completion"-condition
*/
generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
protected generateCompletionAvailableForFinish(targetItemId: string, value: number): ICompletionAvailableFor;
/**
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
* This is a helper method for GenerateEliminationQuest to create a location condition.
@ -195,7 +195,7 @@ export declare class RepeatableQuestController {
* @param {string} location the location on which to fulfill the elimination quest
* @returns {object} object of "Elimination"-location-subcondition
*/
generateEliminationLocation(location: string[]): IEliminationCondition;
protected generateEliminationLocation(location: string[]): IEliminationCondition;
/**
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
* This is a helper method for GenerateEliminationQuest to create a kill condition.
@ -205,7 +205,7 @@ export declare class RepeatableQuestController {
* @param {number} distance distance from which to kill (currently only >= supported)
* @returns {object} object of "Elimination"-kill-subcondition
*/
generateEliminationCondition(target: string, bodyPart: string[], distance: number): IEliminationCondition;
protected generateEliminationCondition(target: string, bodyPart: string[], distance: number): IEliminationCondition;
/**
* Used to create a quest pool during each cycle of repeatable quest generation. The pool will be subsequently
* narrowed down during quest generation to avoid duplicate quests. Like duplicate extractions or elimination quests
@ -214,7 +214,7 @@ export declare class RepeatableQuestController {
* @param pmcLevel level of pmc generating quest pool
* @returns IQuestTypePool
*/
generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
/**
* Generate the reward for a mission. A reward can consist of
* - Experience
@ -235,7 +235,7 @@ export declare class RepeatableQuestController {
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
*/
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
/**
* Helper to create a reward item structured as required by the client
*
@ -244,9 +244,12 @@ export declare class RepeatableQuestController {
* @param {integer} index all rewards will be appended to a list, for unkown reasons the client wants the index
* @returns {object} object of "Reward"-item-type
*/
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
protected generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
protected probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
/**
* Handle RepeatableQuestChange event
*/
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
/**
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
@ -260,5 +263,5 @@ export declare class RepeatableQuestController {
* @param {string} tpl template id of item to check
* @returns boolean: true if item is valid reward
*/
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
}

View File

@ -27,7 +27,9 @@ declare class TradeController {
protected ragfairConfig: IRagfairConfig;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
/** Handle TradingConfirm event */
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RagFairBuyOffer event */
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
}

View File

@ -35,6 +35,7 @@ export declare class TraderController {
*/
update(): boolean;
/**
* Handle client/trading/api/traderSettings
* Return an array of all traders
* @param sessionID Session id
* @returns array if ITraderBase objects
@ -47,6 +48,8 @@ export declare class TraderController {
* @returns 1,-1 or 0
*/
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
/** Handle client/trading/api/getTrader */
getTrader(sessionID: string, traderID: string): ITraderBase;
/** Handle client/trading/api/getTraderAssort */
getAssort(sessionId: string, traderId: string): ITraderAssort;
}

View File

@ -9,6 +9,7 @@ export declare class WeatherController {
protected configServer: ConfigServer;
protected weatherConfig: IWeatherConfig;
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
/** Handle client/weather */
generate(): IWeatherData;
/**
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)

View File

@ -5,6 +5,8 @@ import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData"
export declare class WishlistController {
protected eventOutputHolder: EventOutputHolder;
constructor(eventOutputHolder: EventOutputHolder);
/** Handle AddToWishList */
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
/** Handle RemoveFromWishList event */
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -2,10 +2,10 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
export declare class Router {
private handledRoutes;
protected handledRoutes: HandledRoute[];
getTopLevelRoute(): string;
protected getHandledRoutes(): HandledRoute[];
private getInternalHandledRoutes;
protected getInternalHandledRoutes(): HandledRoute[];
canHandle(url: string, partialMatch?: boolean): boolean;
}
export declare class StaticRouter extends Router {

View File

@ -14,12 +14,12 @@ export declare class AssortHelper {
protected questHelper: QuestHelper;
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile
* @param traderId traders id the assort belongs to
* Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest)
* @param pmcProfile Player profile
* @param traderId Traders id the assort belongs to
* @param traderAssorts All assort items from same trader
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders
* @returns assort items minus locked quest assorts
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete)
* @returns Assort items minus locked quest assorts
*/
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
/**

View File

@ -189,16 +189,16 @@ export declare class HideoutHelper {
* @returns coin slot count
*/
protected getBTCSlots(pmcData: IPmcData): number;
/**
* Get a count of bitcoins player miner can hold
*/
protected getManagementSkillsSlots(): number;
/**
* Does profile have elite hideout management skill
* @param pmcData Profile to look at
* @returns True if profile has skill
*/
protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean;
/**
* Get a count of bitcoins player miner can hold
*/
protected getBitcoinMinerContainerSlotSize(): number;
/**
* Get the hideout management skill from player profile
* @param pmcData Profile to look at
@ -206,12 +206,6 @@ export declare class HideoutHelper {
*/
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
/**
* Get the crafting skill details from player profile
* @param pmcData Player profile
* @returns crafting skill, null if not found
*/
protected getCraftingSkill(pmcData: IPmcData): Common;
/**
* Adjust craft time based on crafting skill level found in player profile
* @param pmcData Player profile

View File

@ -61,6 +61,7 @@ export declare class InRaidHelper {
* @returns Reset profile object
*/
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void;
/**
* Take body part effects from client profile and apply to server profile
* @param saveProgressRequest post-raid request

View File

@ -75,7 +75,7 @@ export declare class InventoryHelper {
*/
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
/**
* Remove item from player inventory
* Remove item from player inventory + insured items array
* @param pmcData Profile to remove item from
* @param itemId Items id to remove
* @param sessionID Session id

View File

@ -186,14 +186,14 @@ declare class ItemHelper {
*/
findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[];
/**
*
* @param pmcData
* @param items
* Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table)
* @param pmcData Player profile
* @param items Items to adjust ID values of
* @param insuredItems insured items to not replace ids for
* @param fastPanel
* @returns
* @returns Item[]
*/
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[];
/**
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
* @param {string} tpl Items tpl to check parents of

View File

@ -63,6 +63,7 @@ export declare class QuestHelper {
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
/**
* Increase skill points of a skill on player profile
* Dupe of PlayerService.incrementSkillLevel()
* @param sessionID Session id
* @param pmcData Player profile
* @param skillName Name of skill to increase skill points of

View File

@ -1,10 +1,10 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { RagfairPriceService } from "../services/RagfairPriceService";
import { ItemHelper } from "./ItemHelper";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairTaxHelper {
protected logger: ILogger;
protected databaseServer: DatabaseServer;

View File

@ -15,6 +15,9 @@ export declare class BundleLoader {
protected jsonUtil: JsonUtil;
protected bundles: Record<string, BundleInfo>;
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil);
/**
* Handle singleplayer/bundles
*/
getBundles(local: boolean): BundleInfo[];
getBundle(key: string, local: boolean): BundleInfo;
addBundles(modpath: string): void;

View File

@ -3,6 +3,7 @@ export interface IGlobals {
time: number;
config: Config;
bot_presets: BotPreset[];
AudioSettings: IAudioSettings;
BotWeaponScatterings: BotWeaponScattering[];
ItemPresets: Record<string, Preset>;
}
@ -1299,6 +1300,20 @@ export interface BotPreset {
FIRST_CONTACT_ADD_SEC: number;
COEF_IF_MOVE: number;
}
export interface IAudioSettings {
AudioGroupPresets: IAudioGroupPreset[];
}
export interface IAudioGroupPreset {
AngleToAllowBinaural: number;
DisabledBinauralByDistance: boolean;
DistanceToAllowBinaural: number;
GroupType: number;
HeightToAllowBinaural: number;
Name: string;
OcclusionEnabled: boolean;
OcclusionIntensity: number;
OverallVolume: number;
}
export interface BotWeaponScattering {
Name: string;
PriorityScatter1meter: number;

View File

@ -40,6 +40,7 @@ export interface Info {
Nickname: string;
LowerNickname: string;
Side: string;
SquadInviteRestriction: boolean;
Voice: string;
Level: number;
Experience: number;

View File

@ -36,6 +36,7 @@ export interface Props {
IsUnremovable?: boolean;
IsLockedafterEquip?: boolean;
IsSpecialSlotOnly?: boolean;
IsStationaryWeapon?: boolean;
QuestItem?: boolean;
QuestStashMaxCount?: number;
LootExperience?: number;
@ -257,6 +258,7 @@ export interface Props {
CutoffFreq?: number;
Resonance?: number;
RolloffMultiplier?: number;
ReverbVolume: number;
CompressorVolume?: number;
AmbientVolume?: number;
DryVolume?: number;

View File

@ -1,3 +1,7 @@
export interface IAcceptFriendRequestData {
export interface IAcceptFriendRequestData extends IBaseFriendRequest {
}
export interface ICancelFriendRequestData extends IBaseFriendRequest {
}
export interface IBaseFriendRequest {
request_id: string;
}

View File

@ -1,4 +1,5 @@
export interface IAddItemRequestData {
/** Trader id */
tid: string;
items: AddItem[];
}

View File

@ -0,0 +1,5 @@
import { LootItem } from "../../../models/spt/services/LootItem";
export interface IAirdropLootResult {
dropType: string;
loot: LootItem[];
}

View File

@ -5,6 +5,7 @@ import { Item } from "../common/tables/IItem";
export interface IAkiProfile {
info: Info;
characters: Characters;
/** Clothing purchases */
suits: string[];
weaponbuilds: WeaponBuild[];
dialogues: Record<string, Dialogue>;

View File

@ -0,0 +1,5 @@
export declare enum SeasonalEventType {
NONE = "None",
CHRISTMAS = "Christmas",
HALLOWEEN = "Halloween"
}

View File

@ -30,5 +30,6 @@ export declare enum WildSpawnTypeNumber {
FOLLOWERBIRDEYE = 28,
BOSSZRYACHIY = 29,
FOLLOWERZRYACHIY = 30,
ARENAFIGHTEREVENT = 31
ARENAFIGHTER = 31,
ARENAFIGHTEREVENT = 32
}

View File

@ -1,6 +1,5 @@
import { IEmptyRequestData } from "../../eft/common/IEmptyRequestData";
import { IGlobals } from "../../eft/common/IGlobals";
import { IQuest } from "../../eft/common/tables/IQuest";
import { IHideoutArea } from "../../eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../../eft/hideout/IHideoutProduction";
import { IHideoutScavCase } from "../../eft/hideout/IHideoutScavCase";
@ -14,7 +13,6 @@ export interface IDataCallbacks {
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;

View File

@ -10,6 +10,7 @@ export interface IAirdropConfig extends IBaseConfig {
planeVolume: number;
planeSpeed: number;
crateFallSpeed: number;
containerIds: Record<string, string>;
airdropMinStartTimeSeconds: number;
airdropMaxStartTimeSeconds: number;
loot: Record<string, AirdropLoot>;

View File

@ -6,5 +6,12 @@ export interface ICoreConfig extends IBaseConfig {
compatibleTarkovVersion: string;
serverName: string;
profileSaveIntervalSeconds: number;
fixes: IGameFixes;
commit: string;
}
export interface IGameFixes {
/** Shotguns use a different value than normal guns causing huge pellet dispersion */
fixShotgunDispersion: boolean;
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
removeModItemsFromProfile: boolean;
}

View File

@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig {
runIntervalSeconds: number;
hoursForSkillCrafting: number;
hideoutWallAppearTimeSeconds: number;
expCraftAmount: number;
}

View File

@ -14,6 +14,10 @@ export interface ILocationConfig extends IBaseConfig {
forcedLootSingleSpawnById: Record<string, string[]>;
/** How many attempts should be taken to fit an item into a container before giving up */
fitLootIntoContainerAttempts: number;
/** Add all possible zones to each maps `OpenZones` property */
addOpenZonesToAllMaps: boolean;
/** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves*/
addCustomBotWavesToMaps: boolean;
}
export interface IFixEmptyBotWavesSettings {
enabled: boolean;

View File

@ -1,7 +1,15 @@
import { MemberCategory } from "../../../models/enums/MemberCategory";
import { MinMax } from "../../common/MinMax";
export interface IPmcConfig {
/** What game version should the PMC have */
gameVersionWeight: Record<string, number>;
/** What account type should the PMC have */
accountTypeWeight: Record<MemberCategory, number>;
/** Global whitelist/blacklist of vest loot for PMCs */
vestLoot: SlotLootSettings;
/** Global whitelist/blacklist of pocket loot for PMCs */
pocketLoot: SlotLootSettings;
/** Global whitelist/blacklist of backpack loot for PMCs */
backpackLoot: SlotLootSettings;
dynamicLoot: DynamicLoot;
useDifficultyOverride: boolean;

View File

@ -1,10 +1,14 @@
import { MinMax } from "../../../models/common/MinMax";
import { SeasonalEventType } from "../../../models/enums/SeasonalEventType";
import { ELocationName } from "../../enums/ELocationName";
import { IBaseConfig } from "./IBaseConfig";
export interface IQuestConfig extends IBaseConfig {
kind: "aki-quest";
redeemTime: number;
questTemplateIds: IPlayerTypeQuestIds;
/** Show non-seasonal quests be shown to player */
showNonSeasonalEventQuests: boolean;
eventQuests: Record<string, IEventQuestData>;
repeatableQuests: IRepeatableQuestConfig[];
locationIdMap: Record<string, string>;
bearOnlyQuests: string[];
@ -19,6 +23,13 @@ export interface IQuestTypeIds {
Completion: string;
Exploration: string;
}
export interface IEventQuestData {
name: string;
season: SeasonalEventType;
startTimestamp: number;
endTimestamp: number;
yearly: boolean;
}
export interface IRepeatableQuestConfig {
name: string;
side: string;

View File

@ -1,3 +1,4 @@
import { SeasonalEventType } from "../../../models/enums/SeasonalEventType";
import { IBaseConfig } from "./IBaseConfig";
export interface ISeasonalEventConfig extends IBaseConfig {
kind: "aki-seasonalevents";
@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig {
}
export interface ISeasonalEvent {
name: string;
type: SeasonalEventType;
startDay: number;
startMonth: number;
endDay: number;

View File

@ -27,6 +27,7 @@ export interface Config {
TurnOffLogging: boolean;
WeaponOverlapDistanceCulling: number;
WebDiagnosticsEnabled: boolean;
NetworkStateView: INetworkStateView;
}
export interface FramerateLimit {
MaxFramerateGameLimit: number;
@ -46,3 +47,7 @@ export interface ReleaseProfiler {
MaxRecords: number;
RecordTriggerValue: number;
}
export interface INetworkStateView {
LossThreshold: number;
RttThreshold: number;
}

View File

@ -1,22 +1,27 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { TimeUtil } from "../utils/TimeUtil";
import { LocalisationService } from "./LocalisationService";
export declare class PlayerService {
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected localisationService: LocalisationService;
protected databaseServer: DatabaseServer;
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
/**
* increases the profile skill and updates any output
* @param {Object} pmcData
* @param {String} skillName
* @param {Number} amount
* Dupe of QuestHelper.rewardsSkillPoints()
* Add xp to a player skill
* @param pmcData Player profile
* @param skillName Name of skill to increment
* @param amount Amount of skill points to add to skill
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
*/
incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void;
incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void;
/**
* @param {Object} pmcData
* @returns number
* Get level of player
* @param pmcData Player profile
* @returns Level of player
*/
calculateLevel(pmcData: IPmcData): number;
}

View File

@ -1,11 +1,14 @@
import { HideoutHelper } from "../helpers/HideoutHelper";
import { InventoryHelper } from "../helpers/InventoryHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Bonus, HideoutSlot } from "../models/eft/common/tables/IBotBase";
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { HideoutAreas } from "../models/enums/HideoutAreas";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { TimeUtil } from "../utils/TimeUtil";
import { Watermark } from "../utils/Watermark";
@ -14,10 +17,13 @@ export declare class ProfileFixerService {
protected logger: ILogger;
protected watermark: Watermark;
protected hideoutHelper: HideoutHelper;
protected inventoryHelper: InventoryHelper;
protected localisationService: LocalisationService;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, localisationService: LocalisationService, timeUtil: TimeUtil, databaseServer: DatabaseServer);
protected configServer: ConfigServer;
protected coreConfig: ICoreConfig;
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
/**
* Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix
@ -91,9 +97,10 @@ export declare class ProfileFixerService {
protected getBonusFromProfile(profileBonuses: Bonus[], bonus: StageBonus): Bonus;
/**
* Checks profile inventiory for items that do not exist inside the items db
* @param sessionId Session id
* @param pmcProfile Profile to check inventory of
*/
checkForOrphanedModdedItems(pmcProfile: IPmcData): void;
checkForOrphanedModdedItems(sessionId: string, pmcProfile: IPmcData): void;
/**
* Add `Improvements` object to hideout if missing - added in eft 13.0.21469
* @param pmcProfile profile to update

View File

@ -1,20 +1,26 @@
import { BotHelper } from "../helpers/BotHelper";
import { Config } from "../models/eft/common/IGlobals";
import { Inventory } from "../models/eft/common/tables/IBotType";
import { SeasonalEventType } from "../models/enums/SeasonalEventType";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { DatabaseImporter } from "../utils/DatabaseImporter";
import { LocalisationService } from "./LocalisationService";
export declare class SeasonalEventService {
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected databaseImporter: DatabaseImporter;
protected localisationService: LocalisationService;
protected botHelper: BotHelper;
protected configServer: ConfigServer;
protected seasonalEventConfig: ISeasonalEventConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
protected get events(): Record<string, string>;
protected questConfig: IQuestConfig;
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
protected get christmasEventItems(): string[];
protected get halloweenEventItems(): string[];
/**
@ -52,12 +58,12 @@ export declare class SeasonalEventService {
*/
seasonalEventEnabled(): boolean;
/**
* is christmas event active
* Is christmas event active (Globals eventtype array contains even name)
* @returns true if active
*/
christmasEventEnabled(): boolean;
/**
* is christmas event active
* is halloween event active (Globals eventtype array contains even name)
* @returns true if active
*/
halloweenEventEnabled(): boolean;
@ -71,12 +77,19 @@ export declare class SeasonalEventService {
* @param eventName Name of event to get gear changes for
* @returns bots with equipment changes
*/
protected getEventBotGear(eventName: string): Record<string, Record<string, Record<string, number>>>;
protected getEventBotGear(eventType: SeasonalEventType): Record<string, Record<string, Record<string, number>>>;
/**
* Get the dates each seasonal event starts and ends at
* @returns Record with event name + start/end date
*/
getEventDetails(): ISeasonalEvent[];
/**
* Look up quest in configs/quest.json
* @param questId Quest to look up
* @param event event type (Christmas/Halloween/None)
* @returns true if related
*/
isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean;
/**
* Check if current date falls inside any of the seasons events pased in, if so, handle them
*/
@ -92,7 +105,12 @@ export declare class SeasonalEventService {
* @param globalConfig globals.json
* @param eventName Name of the event to enable. e.g. Christmas
*/
protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
protected updateGlobalEvents(globalConfig: Config, eventType: SeasonalEventType): void;
/**
* Change trader icons to be more event themed (Halloween only so far)
* @param eventType What event is active
*/
protected adjustTraderIcons(eventType: SeasonalEventType): void;
/**
* Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property
*/
@ -101,7 +119,7 @@ export declare class SeasonalEventService {
* Read in data from seasonalEvents.json and add found equipment items to bots
* @param eventName Name of the event to read equipment in from config
*/
protected addEventGearToBots(eventName: string): void;
protected addEventGearToBots(eventType: SeasonalEventType): void;
protected addPumpkinsToScavBackpacks(): void;
/**
* Set Khorovod(dancing tree) chance to 100% on all maps that support it

View File

@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad {
private filepath;
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer);
/**
* Get path to aki data
* @returns path to data
*/
getSptDataPath(): string;
onLoad(): Promise<void>;
/**
* Read all json files in database folder and map into a json object
* @param filepath path to database folder
*/
protected hydrateDatabase(filepath: string): Promise<void>;
private onReadValidate;
protected onReadValidate(fileWithPath: string, data: string): void;
getRoute(): string;
private validateFile;
protected validateFile(filePathAndName: string, fileData: any): boolean;
/**
* Find and map files with image router inside a designated path
* @param filepath Path to find files in
*/
loadImages(filepath: string, routes: string[]): void;
loadImages(filepath: string, directories: string[], routes: string[]): void;
/**
* Check for a path override in the http json config file
* @param imagePath Key

View File

@ -1,8 +1,8 @@
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
export declare class RagfairOfferHolder {
private offersById;
private offersByTemplate;
private offersByTrader;
protected offersById: Map<string, IRagfairOffer>;
protected offersByTemplate: Map<string, Map<string, IRagfairOffer>>;
protected offersByTrader: Map<string, Map<string, IRagfairOffer>>;
constructor();
getOfferById(id: string): IRagfairOffer;
getOffersByTemplate(templateId: string): Array<IRagfairOffer>;
@ -18,7 +18,7 @@ export declare class RagfairOfferHolder {
* @returns IRagfairOffer array
*/
getStaleOffers(time: number): Array<IRagfairOffer>;
private addOfferByTemplates;
private addOfferByTrader;
protected addOfferByTemplates(template: string, offer: IRagfairOffer): void;
protected addOfferByTrader(trader: string, offer: IRagfairOffer): void;
protected isStale(offer: IRagfairOffer, time: number): boolean;
}

View File

@ -45,9 +45,9 @@ export declare class VFS {
removeFileAsync(filepath: string): Promise<void>;
removeDir(filepath: string): void;
removeDirAsync(filepath: string): Promise<void>;
private lockFileSync;
private checkFileSync;
private unlockFileSync;
protected lockFileSync(filepath: any): void;
protected checkFileSync(filepath: any): any;
protected unlockFileSync(filepath: any): void;
getFileExtension(filepath: string): string;
stripExtension(filepath: string): string;
minifyAllJsonInDirRecursive(filepath: string): Promise<void>;

View File

@ -31,16 +31,17 @@ export declare class Watermark {
*/
getVersionTag(withEftVersion?: boolean): string;
/**
* Handle singleplayer/settings/version
* Get text shown in game on screen, can't be translated as it breaks bsgs client when certian characters are used
* @returns string
*/
getInGameVersionLabel(): string;
/** Set window title */
setTitle(): void;
protected setTitle(): void;
/** Reset console cursor to top */
resetCursor(): void;
protected resetCursor(): void;
/** Draw the watermark */
draw(): void;
protected draw(): void;
/** Caculate text length */
protected textLength(s: string): number;
}