Update types

This commit is contained in:
Dev 2023-07-18 16:56:07 +01:00
parent 622ab3fbc2
commit 91636817ae
86 changed files with 996 additions and 673 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

@ -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,14 +50,19 @@ 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[]>;
/**
@ -76,8 +81,16 @@ export declare class DialogueCallbacks implements OnUpdate {
* 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

@ -1,6 +1,7 @@
import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
@ -48,7 +49,7 @@ declare class GameCallbacks {
/**
* Handle client/match/group/current
*/
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any;
getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICurrentGroupResponse>;
/**
* Handle client/checkVersion
*/

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,32 @@ 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;
/** @deprecated - not called on raid start/end or game start/exit */
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>;
/**
* @deprecated - not called on raid start/end or game start/exit
* 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";
@ -50,6 +51,7 @@ export declare class GameController {
* Handle client/game/start
*/
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
protected adjustMapBotLimits(): void;
/**
* Handle client/game/config
*/
@ -66,6 +68,10 @@ export declare class GameController {
* 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
*/

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

@ -189,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

@ -27,14 +27,22 @@ 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

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,9 +57,10 @@ 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
* Was extract by car
* @param extractName name of extract
* @returns true if car extract
*/

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

@ -41,6 +41,7 @@ export declare class QuestController {
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, 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
@ -67,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
@ -94,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
@ -133,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

@ -1,6 +1,6 @@
import { MinMax } from "../models/common/MinMax";
import { IRandomisedBotLevelResult } from "../models/eft/bot/IRandomisedBotLevelResult";
import { ExpTable } from "../models/eft/common/IGlobals";
import { IExpTable } from "../models/eft/common/IGlobals";
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
import { ILogger } from "../models/spt/utils/ILogger";
@ -25,5 +25,5 @@ export declare class BotLevelGenerator {
* @param relativeDeltaMax max delta above player level to go
* @returns highest level possible for bot
*/
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: ExpTable[]): number;
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number;
}

View File

@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { Preset } from "../models/eft/common/IGlobals";
import { IPreset } from "../models/eft/common/IGlobals";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
@ -71,7 +71,7 @@ export declare class LootGenerator {
* @param result array to add found preset to
* @returns true if preset was valid and added to pool
*/
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, Preset][], itemTypeCounts: Record<string, {
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, IPreset][], itemTypeCounts: Record<string, {
current: number;
max: number;
}>, itemBlacklist: string[], result: LootItem[]): boolean;
@ -95,7 +95,7 @@ export declare class LootGenerator {
* @param chosenWeaponPreset The weapon preset given to player as reward
* @returns AddItem array
*/
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): AddItem[];
/**
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
* @param rewardContainerDetails

View File

@ -1,5 +1,5 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { Preset } from "../models/eft/common/IGlobals";
import { IPreset } from "../models/eft/common/IGlobals";
import { Item } from "../models/eft/common/tables/IItem";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ConfigServer } from "../servers/ConfigServer";
@ -36,12 +36,12 @@ export declare class RagfairAssortGenerator {
* Get presets from globals.json
* @returns Preset object array
*/
protected getPresets(): Preset[];
protected getPresets(): IPreset[];
/**
* Get default presets from globals.json
* @returns Preset object array
*/
protected getDefaultPresets(): Preset[];
protected getDefaultPresets(): IPreset[];
/**
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
* @param tplId tplid to add to item

View File

@ -1,5 +1,6 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { Product } from "../models/eft/common/tables/IBotBase";
import { Upd } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
@ -78,7 +79,7 @@ export declare class ScavCaseRewardGenerator {
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
_id: string;
_tpl: string;
upd: any;
upd: Upd;
}, rarity: string): void;
/**
*

View File

@ -53,5 +53,7 @@ export declare class HealthHelper {
* @param duration How long the effect has left in seconds (-1 by default, no duration).
*/
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
protected isEmpty(map: any): boolean;
protected isEmpty(map: Record<string, {
Time: number;
}>): boolean;
}

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

@ -1,18 +1,18 @@
import { Preset } from "../models/eft/common/IGlobals";
import { IPreset } from "../models/eft/common/IGlobals";
import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
export declare class PresetHelper {
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected lookup: Record<string, string[]>;
protected defaultPresets: Record<string, Preset>;
protected defaultPresets: Record<string, IPreset>;
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
hydratePresetStore(input: Record<string, string[]>): void;
getDefaultPresets(): Record<string, Preset>;
getDefaultPresets(): Record<string, IPreset>;
isPreset(id: string): boolean;
hasPreset(templateId: string): boolean;
getPreset(id: string): Preset;
getPresets(templateId: string): Preset[];
getDefaultPreset(templateId: string): Preset;
getPreset(id: string): IPreset;
getPresets(templateId: string): IPreset[];
getDefaultPreset(templateId: string): IPreset;
getBaseItemTpl(presetId: string): string;
}

View File

@ -68,6 +68,10 @@ export declare class ProfileHelper {
getFullProfile(sessionID: string): IAkiProfile;
getPmcProfile(sessionID: string): IPmcData;
getScavProfile(sessionID: string): IPmcData;
/**
* Get baseline counter values for a fresh profile
* @returns Stats
*/
getDefaultCounters(): Stats;
protected isWiped(sessionID: string): boolean;
protected getServerVersion(): string;

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;

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
import { MinMax } from "../../../models/common/MinMax";
import { Ixyz } from "./Ixyz";
export interface ILocationBase {
AccessKeys: string[];
AirdropParameters: AirdropParameter[];
@ -81,9 +83,7 @@ export interface ILocationBase {
users_summon_seconds: number;
waves: Wave[];
}
export interface ILimit {
min: number;
max: number;
export interface ILimit extends MinMax {
items: any[];
}
export interface AirdropParameter {
@ -140,10 +140,8 @@ export interface BotLocationModifier {
Scattering: number;
VisibleDistance: number;
}
export interface MinMaxBot {
WildSpawnType: WildSpawnType;
max: number;
min: number;
export interface MinMaxBot extends MinMax {
WildSpawnType: WildSpawnType | string;
}
export interface Preview {
path: string;
@ -160,7 +158,7 @@ export interface SpawnPointParam {
DelayToCanSpawnSec: number;
Id: string;
Infiltration: string;
Position: xyz;
Position: Ixyz;
Rotation: number;
Sides: string[];
}
@ -169,14 +167,9 @@ export interface ColliderParams {
_props: Props;
}
export interface Props {
Center: xyz;
Center: Ixyz;
Radius: number;
}
export interface xyz {
x: number;
y: number;
z: number;
}
export interface Exit {
Chance: number;
Count: number;
@ -211,5 +204,6 @@ export interface Wave {
}
export declare enum WildSpawnType {
ASSAULT = "assault",
MARKSMAN = "marksman"
MARKSMAN = "marksman",
PMCBOT = "pmcbot"
}

View File

@ -1,3 +1,4 @@
import { Ixyz } from "./Ixyz";
import { Item } from "./tables/IItem";
export interface ILooseLoot {
spawnpointCount: SpawnpointCount;
@ -18,11 +19,11 @@ export interface SpawnpointTemplate {
IsStatic: boolean;
useGravity: boolean;
randomRotation: boolean;
Position: Xyz;
Rotation: Xyz;
Position: Ixyz;
Rotation: Ixyz;
IsGroupPosition: boolean;
GroupPositions: any[];
Root: any;
Root: string;
Items: Item[];
}
export interface Spawnpoint {
@ -31,11 +32,6 @@ export interface Spawnpoint {
template: SpawnpointTemplate;
itemDistribution: ItemDistribution[];
}
export interface Xyz {
x: number;
y: number;
z: number;
}
export interface ItemDistribution {
composedKey: ComposedKey;
relativeProbability: number;

View File

@ -0,0 +1,5 @@
export interface Ixyz {
x: number;
y: number;
z: number;
}

View File

@ -1,3 +1,4 @@
import { Ixyz } from "../Ixyz";
export interface ICustomizationItem {
_id: string;
_name: string;
@ -19,15 +20,10 @@ export interface Props {
Prefab: Prefab;
WatchPrefab: Prefab;
IntegratedArmorVest: boolean;
WatchPosition: Xyz;
WatchRotation: Xyz;
WatchPosition: Ixyz;
WatchRotation: Ixyz;
}
export interface Prefab {
path: string;
rcid: string;
}
export interface Xyz {
x: number;
y: number;
z: number;
}

View File

@ -1,3 +1,4 @@
import { Ixyz } from "../Ixyz";
import { Item } from "./IItem";
export interface ILootBase {
staticAmmo: Record<string, IStaticAmmoDetails[]>;
@ -18,8 +19,8 @@ export interface IStaticWeaponProps {
IsStatic: boolean;
useGravity: boolean;
randomRotation: boolean;
Position: Xyz;
Rotation: Xyz;
Position: Ixyz;
Rotation: Ixyz;
IsGroupPosition: boolean;
GroupPositions: any[];
Root: string;
@ -30,20 +31,15 @@ export interface IStaticContainerProps {
IsStatic: boolean;
useGravity: boolean;
randomRotation: boolean;
Position: Xyz;
Rotation: Xyz;
Position: Ixyz;
Rotation: Ixyz;
IsGroupPosition: boolean;
GroupPositions: any[];
Root: any;
Root: string;
Items: StaticItem[];
}
export interface Xyz {
x: number;
y: number;
z: number;
}
export interface StaticItem {
_id: any;
_id: string;
_tpl: string;
}
export interface IStaticForcedProps {

View File

@ -1,7 +1,9 @@
import { QuestRewardType } from "../../../enums/QuestRewardType";
import { QuestStatus } from "../../../enums/QuestStatus";
import { QuestTypeEnum } from "../../../enums/QuestTypeEnum";
import { Item } from "./IItem";
export interface IQuest {
/** SPT addition - human readable quest name */
QuestName?: string;
_id: string;
canShowNotificationsInGame: boolean;
@ -13,9 +15,10 @@ export interface IQuest {
traderId: string;
location: string;
image: string;
type: string;
type: QuestTypeEnum;
isKey: boolean;
questStatus: any;
/** @deprecated - Likely not used, use 'status' instead */
questStatus: QuestStatus;
restartable: boolean;
instantComplete: boolean;
secretQuest: boolean;
@ -23,9 +26,11 @@ export interface IQuest {
successMessageText: string;
templateId: string;
rewards: Rewards;
/** Becomes 'AppearStatus' inside client */
status: string | number;
KeyQuest: boolean;
changeQuestMessageText: string;
/** "Pmc" or "Scav" */
side: string;
}
export interface Conditions {

View File

@ -1,3 +1,4 @@
import { Ixyz } from "../Ixyz";
export interface ITemplateItem {
_id: string;
_name: string;
@ -201,11 +202,11 @@ export interface Props {
CameraSnap?: number;
ReloadMode?: string;
AimPlane?: number;
TacticalReloadStiffnes?: Xyz;
TacticalReloadStiffnes?: Ixyz;
TacticalReloadFixation?: number;
RecoilCenter?: Xyz;
RotationCenter?: Xyz;
RotationCenterNoStock?: Xyz;
RecoilCenter?: Ixyz;
RotationCenter?: Ixyz;
RotationCenterNoStock?: Ixyz;
FoldedSlot?: string;
CompactHandling?: boolean;
MinRepairDegradation?: number;
@ -247,7 +248,7 @@ export interface Props {
FaceShieldComponent?: boolean;
FaceShieldMask?: string;
MaterialType?: string;
RicochetParams?: Xyz;
RicochetParams?: Ixyz;
DeafStrength?: string;
BlindnessProtection?: number;
Distortion?: number;
@ -283,12 +284,12 @@ export interface Props {
PrimaryConsumption?: number;
SecondryConsumption?: number;
DeflectionConsumption?: number;
AppliedTrunkRotation?: Xyz;
AppliedHeadRotation?: Xyz;
AppliedTrunkRotation?: Ixyz;
AppliedHeadRotation?: Ixyz;
DisplayOnModel?: boolean;
AdditionalAnimationLayer?: number;
StaminaBurnRate?: number;
ColliderScaleMultiplier?: Xyz;
ColliderScaleMultiplier?: Ixyz;
ConfigPathStr?: string;
MaxMarkersCount?: number;
scaleMin?: number;
@ -353,9 +354,9 @@ export interface Props {
ShowHitEffectOnExplode?: boolean;
ExplosionType?: string;
AmmoLifeTimeSec?: number;
Contusion?: Xyz;
ArmorDistanceDistanceDamage?: Xyz;
Blindness?: Xyz;
Contusion?: Ixyz;
ArmorDistanceDistanceDamage?: Ixyz;
Blindness?: Ixyz;
IsLightAndSoundShot?: boolean;
LightAndSoundShotAngle?: number;
LightAndSoundShotSelfContusionTime?: number;
@ -427,11 +428,6 @@ export interface SlotFilter {
Filter: string[];
AnimationIndex?: number;
}
export interface Xyz {
x: number;
y: number;
z: number;
}
export interface StackSlot {
_name?: string;
_id: string;

View File

@ -1,6 +1,6 @@
import { Message } from "../profile/IAkiProfile";
import { IUserDialogInfo, Message } from "../profile/IAkiProfile";
export interface IGetMailDialogViewResponseData {
messages: Message[];
profiles: any[];
profiles: IUserDialogInfo[];
hasMessagesWithRewards: boolean;
}

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

@ -1,5 +1,4 @@
export interface IGetItemPriceResult {
import { MinMax } from "../../../models/common/MinMax";
export interface IGetItemPriceResult extends MinMax {
avg: number;
min: number;
max: number;
}

View File

@ -5,5 +5,7 @@ export declare enum QuestRewardType {
TRADER_UNLOCK = "TraderUnlock",
ITEM = "Item",
ASSORTMENT_UNLOCK = "AssortmentUnlock",
PRODUCTIONS_SCHEME = "ProductionScheme"
PRODUCTIONS_SCHEME = "ProductionScheme",
TRADER_STANDING_RESET = "TraderStandingReset",
TRADER_STANDING_RESTORE = "TraderStandingRestore"
}

View File

@ -0,0 +1,15 @@
export declare enum QuestTypeEnum {
PICKUP = "PickUp",
ELIMINATION = "Elimination",
DISCOVER = "Discover",
COMPLETION = "Completion",
EXPLORATION = "Exploration",
LEVELLING = "Levelling",
EXPERIENCE = "Experience",
STANDING = "Standing",
LOYALTY = "Loyalty",
MERCHANT = "Merchant",
SKILL = "Skill",
MULTI = "Multi",
WEAPON_ASSEMBLY = "WeaponAssembly"
}

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

@ -5,16 +5,26 @@ export interface IAirdropConfig extends IBaseConfig {
kind: "aki-airdrop";
airdropChancePercent: AirdropChancePercent;
airdropTypeWeightings: Record<AirdropTypeEnum, number>;
/** Lowest point plane will fly at */
planeMinFlyHeight: number;
/** Highest point plane will fly at */
planeMaxFlyHeight: number;
/** Loudness of plane engine */
planeVolume: number;
/** Speed plane flies overhead */
planeSpeed: number;
/** Speed loot crate falls after being dropped */
crateFallSpeed: number;
/** Container tpls to use when spawning crate - affects container size, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */
containerIds: Record<string, string>;
/** Earliest time aircraft will spawn in raid */
airdropMinStartTimeSeconds: number;
/** Latest time aircraft will spawn in raid */
airdropMaxStartTimeSeconds: number;
/** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */
loot: Record<string, AirdropLoot>;
}
/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */
export interface AirdropChancePercent {
bigmap: number;
woods: number;
@ -24,14 +34,22 @@ export interface AirdropChancePercent {
reserve: number;
tarkovStreets: number;
}
/** Loot inside crate */
export interface AirdropLoot {
/** Min/max of weapons inside crate */
presetCount?: MinMax;
/** Min/max of items inside crate */
itemCount: MinMax;
/** Min/max of sealed weapon boxes inside crate */
weaponCrateCount: MinMax;
/** Items to never allow - tpls */
itemBlacklist: string[];
/** Item type (parentId) to allow inside crate */
itemTypeWhitelist: string[];
/** key: item base type: value: max count */
/** Item type/ item tpls to limit count of inside crate - key: item base type: value: max count */
itemLimits: Record<string, number>;
/** Items to limit stack size of key: item tpl value: min/max stack size */
itemStackLimits: Record<string, MinMax>;
/** Armor levels to allow inside crate e.g. [4,5,6] */
armorLevelWhitelist?: number[];
}

View File

@ -32,6 +32,7 @@ export interface IBotConfig extends IBaseConfig {
/** Batch generation size when type not available in cache */
botGenerationBatchSizePerType: number;
}
/** Number of bots to generate and store in cache on raid start per bot type */
export interface PresetBatch {
assault: number;
bossBully: number;
@ -67,7 +68,9 @@ export interface LootNvalue {
pmc: number;
}
export interface EquipmentFilters {
/** Limits for mod types per weapon .e.g. scopes */
weaponModLimits: ModLimits;
/** Whitelsit for weapons allowed per gun */
weaponSightWhitelist: Record<string, string[]>;
faceShieldIsActiveChancePercent?: number;
lightIsActiveDayChancePercent?: number;
@ -75,10 +78,14 @@ export interface EquipmentFilters {
laserIsActiveChancePercent?: number;
nvgIsActiveChanceDayPercent?: number;
nvgIsActiveChanceNightPercent?: number;
/** Adjust weighting/chances of items on bot by level of bot */
randomisation: RandomisationDetails[];
/** Blacklist equipment by level of bot */
blacklist: EquipmentFilterDetails[];
/** Whitelist equipment by level of bot */
whitelist: EquipmentFilterDetails[];
clothing: WeightingAdjustmentDetails[];
/** Adjust clothing choice weighting by level of bot */
weightingAdjustments: WeightingAdjustmentDetails[];
}
export interface ModLimits {
@ -88,24 +95,34 @@ export interface ModLimits {
lightLaserLimit?: number;
}
export interface RandomisationDetails {
/** Between what levels do these randomisation setting apply to */
levelRange: MinMax;
generation?: Record<string, MinMaxWithWhitelist>;
/** Mod slots that should be fully randomisate -ignores mods from bottype.json */
randomisedWeaponModSlots?: string[];
/** Armor slots that should be randomised e.g. 'Headwear, Armband' */
randomisedArmorSlots?: string[];
/** Equipment chances */
equipment?: Record<string, number>;
/** Modc chances */
/** Mod chances */
mods?: Record<string, number>;
}
export interface EquipmentFilterDetails {
/** Between what levels do these equipment filter setting apply to */
levelRange: MinMax;
/** Key: mod slot name e.g. mod_magazine, value: item tpls */
equipment: Record<string, string[]>;
/** Key: cartridge type e.g. Caliber23x75, value: item tpls */
cartridge: Record<string, string[]>;
}
export interface WeightingAdjustmentDetails {
/** Between what levels do these weight settings apply to */
levelRange: MinMax;
/** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */
ammo?: AdjustmentDetails;
/** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */
equipment?: AdjustmentDetails;
/** Key: clothing slor e.g. feet, value: item tpl + weight */
clothing?: AdjustmentDetails;
}
export interface AdjustmentDetails {

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

@ -2,10 +2,15 @@ import { IBaseConfig } from "./IBaseConfig";
export interface IInRaidConfig extends IBaseConfig {
kind: "aki-inraid";
MIAOnRaidEnd: boolean;
/** Overrides to apply to the pre-raid settings screen */
raidMenuSettings: RaidMenuSettings;
/** What effects should be saved post-raid */
save: Save;
/** Names of car extracts */
carExtracts: string[];
/** Fene rep gain from a single car extract */
carExtractBaseStandingGain: number;
/** Fence rep gain when successfully extracting as pscav */
scavExtractGain: number;
}
export interface RaidMenuSettings {
@ -17,6 +22,7 @@ export interface RaidMenuSettings {
enablePve: boolean;
}
export interface Save {
/** Should loot gained from raid be saved */
loot: boolean;
durability: boolean;
}

View File

@ -1,10 +1,16 @@
import { IBaseConfig } from "./IBaseConfig";
export interface IInsuranceConfig extends IBaseConfig {
kind: "aki-insurance";
/** Insurance price multiplier */
insuranceMultiplier: Record<string, number>;
/** Chance item is returned as insurance, keyed by trader id */
returnChancePercent: Record<string, number>;
/** Item slots that should never be returned as insurance */
blacklistedEquipment: string[];
/** Names of equipment slots that could not be returned as insurance */
slotIdsWithChanceOfNotReturning: string[];
/** Override to control how quickly insurance is processed/returned in second */
returnTimeOverrideSeconds: number;
/** How often server should process insurance in seconds */
runIntervalSeconds: number;
}

View File

@ -2,6 +2,7 @@ import { MinMax } from "../../../models/common/MinMax";
import { IBaseConfig } from "./IBaseConfig";
export interface IInventoryConfig extends IBaseConfig {
kind: "aki-inventory";
/** Should new items purchased by flagged as found in raid */
newItemsMarkedFound: boolean;
randomLootContainers: Record<string, RewardDetails>;
sealedAirdropContainer: ISealedAirdropContainerSettings;
@ -17,6 +18,7 @@ export interface RewardDetails {
export interface ISealedAirdropContainerSettings {
weaponRewardWeight: Record<string, number>;
defaultPresetsOnly: boolean;
/** Should contents be flagged as found in raid when opened */
foundInRaid: boolean;
weaponModRewardLimits: Record<string, MinMax>;
rewardTypeLimits: Record<string, MinMax>;

View File

@ -1,12 +1,17 @@
import { MinMax } from "../../../models/common/MinMax";
import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBase";
import { IBaseConfig } from "./IBaseConfig";
export interface ILocationConfig extends IBaseConfig {
kind: "aki-location";
/** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */
fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings;
/** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */
rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings;
/** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */
splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings;
looseLootMultiplier: LootMultiplier;
staticLootMultiplier: LootMultiplier;
/** Custom bot waves to add to a locations base json on game start if addCustomBotWavesToMaps is true */
customWaves: CustomWaves;
/** Open zones to add to map */
openZones: Record<string, string[]>;
@ -14,6 +19,14 @@ 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;
/** Should the limits defined inside botTypeLimits to appled to locations on game start */
enableBotTypeLimits: boolean;
/** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true*/
botTypeLimits: Record<string, IBotTypeLimit[]>;
}
export interface IFixEmptyBotWavesSettings {
enabled: boolean;
@ -29,9 +42,14 @@ export interface ISplitWaveSettings {
waveSizeThreshold: number;
}
export interface CustomWaves {
/** Bosses spawn on raid start */
boss: Record<string, BossLocationSpawn[]>;
normal: Record<string, Wave[]>;
}
export interface IBotTypeLimit extends MinMax {
type: string;
}
/** Multiplier to apply to the loot count for a given map */
export interface LootMultiplier {
bigmap: number;
develop: number;

View File

@ -1,8 +1,11 @@
import { IBaseConfig } from "./IBaseConfig";
export interface ILostOnDeathConfig extends IBaseConfig {
kind: "aki-lostondeath";
/** What equipment in each slot should be lost on death */
equipment: Equipment;
/** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */
specialSlotItems: boolean;
/** Should quest items be removed from quest inventory on death */
questItems: boolean;
}
export interface Equipment {

View File

@ -12,21 +12,31 @@ export interface IPmcConfig {
/** Global whitelist/blacklist of backpack loot for PMCs */
backpackLoot: SlotLootSettings;
dynamicLoot: DynamicLoot;
/** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */
useDifficultyOverride: boolean;
/** Difficulty override e.g. "AsOnline/Hard" */
difficulty: string;
/** Chance out of 100 to have a complete gun in backpack */
looseWeaponInBackpackChancePercent: number;
/** MinMax count of weapons to have in backpack */
looseWeaponInBackpackLootMinMax: MinMax;
/** Percentage chance PMC will be USEC */
isUsec: number;
/** WildSpawnType enum value USEC PMCs use */
usecType: string;
/** WildSpawnType enum value BEAR PMCs use */
bearType: string;
chanceSameSideIsHostilePercent: number;
/** key: location, value: type for usec/bear */
/** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */
pmcType: Record<string, Record<string, Record<string, number>>>;
maxBackpackLootTotalRub: number;
maxPocketLootTotalRub: number;
maxVestLootTotalRub: number;
/** Percentage chance a bot from a wave is converted into a PMC, key = bot wildspawn tpye (assault/exusec), value: min+max chance to be converted */
convertIntoPmcChance: Record<string, MinMax>;
/** WildSpawnType bots PMCs should see as hostile */
enemyTypes: string[];
/** How many levels above player level can a PMC be */
botRelativeLevelDeltaMax: number;
}
export interface PmcTypes {

View File

@ -29,10 +29,8 @@ export interface Chance {
overpriced: number;
underpriced: number;
}
export interface Time {
export interface Time extends MinMax {
base: number;
min: number;
max: number;
}
export interface Reputation {
gain: number;
@ -100,11 +98,9 @@ export interface OfferAdjustment {
/** What is the minimum rouble price to consider adjusting price of item */
priceThreshholdRub: number;
}
export interface Condition {
export interface Condition extends MinMax {
/** Percentage change durability is altered */
conditionChance: number;
min: number;
max: number;
}
export interface Blacklist {
/** Damaged ammo packs */

View File

@ -6,6 +6,7 @@ export interface ITraderConfig extends IBaseConfig {
purchasesAreFoundInRaid: boolean;
updateTimeDefault: number;
traderPriceMultipler: number;
/** Keep track of purchased trader-limited items beyond server restarts to prevent server-restart item scumming */
persistPurchaseDataInProfile: boolean;
fence: FenceConfig;
}

View File

@ -1,5 +1,5 @@
import { Preset } from "../../eft/common/IGlobals";
import { IPreset } from "../../eft/common/IGlobals";
export interface CustomPreset {
key: string;
preset: Preset;
preset: IPreset;
}

View File

@ -1,7 +1,7 @@
import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { FenceLevel, Preset } from "../models/eft/common/IGlobals";
import { IFenceLevel, IPreset } from "../models/eft/common/IGlobals";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
@ -146,7 +146,7 @@ export declare class FenceService {
* @param assorts object to add presets to
* @param loyaltyLevel loyalty level to requre item at
*/
protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record<string, Preset>, assorts: ITraderAssort, loyaltyLevel: number): void;
protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record<string, IPreset>, assorts: ITraderAssort, loyaltyLevel: number): void;
/**
* Randomise items' upd properties e.g. med packs/weapons/armor
* @param itemDetails Item being randomised
@ -176,7 +176,7 @@ export declare class FenceService {
* @param pmcData Player profile
* @returns FenceLevel object
*/
getFenceInfo(pmcData: IPmcData): FenceLevel;
getFenceInfo(pmcData: IPmcData): IFenceLevel;
/**
* Remove an assort from fence by id
* @param assortIdToRemove assort id to remove from fence assorts

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

@ -3,7 +3,7 @@ import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { Preset } from "../models/eft/common/IGlobals";
import { IPreset } from "../models/eft/common/IGlobals";
import { Item } from "../models/eft/common/tables/IItem";
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
@ -126,8 +126,8 @@ export declare class RagfairPriceService implements OnLoad {
* @param presets weapon presets to choose from
* @returns Default preset object
*/
protected getWeaponPreset(presets: Preset[], weapon: Item): {
protected getWeaponPreset(presets: IPreset[], weapon: Item): {
isDefault: boolean;
preset: Preset;
preset: IPreset;
};
}

View File

@ -1,5 +1,5 @@
import { BotHelper } from "../helpers/BotHelper";
import { Config } from "../models/eft/common/IGlobals";
import { IConfig } 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";
@ -105,7 +105,7 @@ export declare class SeasonalEventService {
* @param globalConfig globals.json
* @param eventName Name of the event to enable. e.g. Christmas
*/
protected updateGlobalEvents(globalConfig: Config, eventType: SeasonalEventType): void;
protected updateGlobalEvents(globalConfig: IConfig, eventType: SeasonalEventType): void;
/**
* Change trader icons to be more event themed (Halloween only so far)
* @param eventType What event is active

View File

@ -37,9 +37,9 @@ export declare class DatabaseImporter implements OnLoad {
* @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

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;
}