diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts +++ b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/Ixyz.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/GiftSenderType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/GiftSentResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ItemAddedResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts b/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/10ScopesAndTypes/types/services/GiftService.d.ts b/TypeScript/10ScopesAndTypes/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts b/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/10ScopesAndTypes/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/10ScopesAndTypes/types/utils/RagfairOfferHolder.d.ts b/TypeScript/10ScopesAndTypes/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts b/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts +++ b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/Ixyz.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/GiftSenderType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/GiftSentResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ItemAddedResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts b/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/11BundleLoadingSample/types/services/GiftService.d.ts b/TypeScript/11BundleLoadingSample/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts b/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/11BundleLoadingSample/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/11BundleLoadingSample/types/utils/RagfairOfferHolder.d.ts b/TypeScript/11BundleLoadingSample/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts b/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/Ixyz.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSenderType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSentResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ItemAddedResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/12ClassExtensionOverride/types/services/GiftService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/12ClassExtensionOverride/types/utils/RagfairOfferHolder.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts index 3365636..23cb707 100644 --- a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts @@ -87,7 +87,7 @@ export declare class DialogueCallbacks implements OnUpdate { ignoreFriend(url: string, request: { uid: string; }, sessionID: string): any; - /** Handle client/friend/ignore/set */ + /** Handle client/friend/ignore/remove */ unIgnoreFriend(url: string, request: { uid: string; }, sessionID: string): any; diff --git a/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts index 9bcba88..77f6a27 100644 --- a/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/ProfileCallbacks.d.ts @@ -76,5 +76,5 @@ export declare class ProfileCallbacks { /** * Handle /launcher/profiles */ - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts index 9db517b..5904c1a 100644 --- a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts @@ -1,17 +1,30 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest"; import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); /** Handle onUpdate spt event */ update(): void; /** @@ -34,6 +47,14 @@ export declare class DialogueController { * @returns DialogueInfo */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -51,7 +72,13 @@ export declare class DialogueController { * @returns Dialogue */ protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -65,21 +92,39 @@ 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/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; /** client/mail/msg/send */ sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index c8f13ff..6d0ce18 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -18,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -40,17 +41,19 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Handle client/game/start */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ protected adjustMapBotLimits(): void; /** * Handle client/game/config @@ -95,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index fa22462..f224662 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -99,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts index c28581c..3fe5b39 100644 --- a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts @@ -6,7 +6,6 @@ import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -101,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ diff --git a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts index d83894e..156936e 100644 --- a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts @@ -34,13 +34,19 @@ export declare class LocationController { * @returns ILocationBase */ get(location: string): ILocationBase; - private generate; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; /** * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdop container diff --git a/TypeScript/13AddTrader/types/controllers/ProfileController.d.ts b/TypeScript/13AddTrader/types/controllers/ProfileController.d.ts index ea20498..ffccdaf 100644 --- a/TypeScript/13AddTrader/types/controllers/ProfileController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/ProfileController.d.ts @@ -18,6 +18,8 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { ProfileFixerService } from "../services/ProfileFixerService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -29,13 +31,15 @@ export declare class ProfileController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected dialogueHelper: DialogueHelper; protected questHelper: QuestHelper; protected 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); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper); /** * Handle /launcher/profiles */ diff --git a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts index a9129c2..3e8b7dd 100644 --- a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,6 +19,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; @@ -30,7 +32,9 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; @@ -39,7 +43,7 @@ export declare class QuestController { protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** * Handle client/quest/list * Get all quests visible to player @@ -128,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile diff --git a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/13AddTrader/types/helpers/ContainerHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/13AddTrader/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts b/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/13AddTrader/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/13AddTrader/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/13AddTrader/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts index 01539b8..e9d3746 100644 --- a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** diff --git a/TypeScript/13AddTrader/types/helpers/HttpServerHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/13AddTrader/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index db56f82..7ca91f9 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,6 +63,14 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile @@ -68,6 +78,7 @@ export declare class InRaidHelper { * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index f4ead8c..ff96a23 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index 78f5c30..47fe9ab 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. diff --git a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts index 26bd7e9..a2fb099 100644 --- a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -81,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index 369e29d..6bbaa0c 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -114,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts b/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts b/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts index 19321db..1d3c754 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts @@ -661,7 +661,7 @@ export interface ICategories { kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts index c94f30e..f064225 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts @@ -37,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -51,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -143,6 +145,10 @@ export interface BotLocationModifier { export interface MinMaxBot extends MinMax { WildSpawnType: WildSpawnType | string; } +export interface MinPlayerWaitTime { + minPlayers: number; + time: number; +} export interface Preview { path: string; rcid: string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts index fa636b4..c6005ca 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts @@ -69,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/13AddTrader/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/13AddTrader/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/13AddTrader/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts b/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts index 466dd36..d08da6e 100644 --- a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts @@ -62,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -76,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -116,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -123,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts b/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/13AddTrader/types/models/enums/GiftSenderType.d.ts b/TypeScript/13AddTrader/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/13AddTrader/types/models/enums/GiftSentResult.d.ts b/TypeScript/13AddTrader/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/13AddTrader/types/models/enums/ItemAddedResult.d.ts b/TypeScript/13AddTrader/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/13AddTrader/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/13AddTrader/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts b/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts index dde0b33..fee0ad2 100644 --- a/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts @@ -7,5 +7,6 @@ export declare enum QuestRewardType { ASSORTMENT_UNLOCK = "AssortmentUnlock", PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", - TRADER_STANDING_RESTORE = "TraderStandingRestore" + TRADER_STANDING_RESTORE = "TraderStandingRestore", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts b/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts index 03aa557..d7cf037 100644 --- a/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/SeasonalEventType.d.ts @@ -1,5 +1,7 @@ export declare enum SeasonalEventType { NONE = "None", CHRISTMAS = "Christmas", - HALLOWEEN = "Halloween" + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" } diff --git a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts index f3a4b36..921e797 100644 --- a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts @@ -31,5 +31,8 @@ export declare enum WildSpawnTypeNumber { BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, ARENAFIGHTER = 31, - ARENAFIGHTEREVENT = 32 + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts index a536106..511b152 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts @@ -62,6 +62,11 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts index fbf0a44..a349ac2 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts @@ -38,6 +38,8 @@ export interface IPmcConfig { enemyTypes: string[]; /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts index bf3d9d8..87e0173 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts @@ -71,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index 145f98f..be6ab91 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -24,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts b/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/13AddTrader/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/13AddTrader/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/13AddTrader/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/13AddTrader/types/services/FenceService.d.ts b/TypeScript/13AddTrader/types/services/FenceService.d.ts index f5a6d76..3f0e01b 100644 --- a/TypeScript/13AddTrader/types/services/FenceService.d.ts +++ b/TypeScript/13AddTrader/types/services/FenceService.d.ts @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts diff --git a/TypeScript/13AddTrader/types/services/GiftService.d.ts b/TypeScript/13AddTrader/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/13AddTrader/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/13AddTrader/types/services/MailSendService.d.ts b/TypeScript/13AddTrader/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/13AddTrader/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/13AddTrader/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/13AddTrader/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/13AddTrader/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/13AddTrader/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 235499c..418626d 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -1,5 +1,6 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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"; @@ -7,6 +8,7 @@ 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -18,17 +20,20 @@ export declare class ProfileFixerService { protected watermark: Watermark; protected hideoutHelper: HideoutHelper; protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; protected localisationService: LocalisationService; protected timeUtil: TimeUtil; protected 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); + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile diff --git a/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts b/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts index 0af14a4..e245efa 100644 --- a/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts +++ b/TypeScript/13AddTrader/types/services/RagfairPriceService.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** diff --git a/TypeScript/13AddTrader/types/services/RepairService.d.ts b/TypeScript/13AddTrader/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/13AddTrader/types/services/RepairService.d.ts +++ b/TypeScript/13AddTrader/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 0475c5c..9fb3454 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -1,4 +1,5 @@ import { BotHelper } from "../helpers/BotHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; import { IConfig } from "../models/eft/common/IGlobals"; import { Inventory } from "../models/eft/common/tables/IBotType"; import { SeasonalEventType } from "../models/enums/SeasonalEventType"; @@ -9,18 +10,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; protected questConfig: IQuestConfig; protected httpConfig: IHttpConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -48,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -92,8 +96,9 @@ export declare class SeasonalEventService { isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id */ - checkForAndEnableSeasonalEvents(): void; + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -102,10 +107,11 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: IConfig, eventType: SeasonalEventType): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) * @param eventType What event is active @@ -129,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/BundleCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/NoteCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/QuestCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/RepairCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/TradeCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/CustomizationController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/CustomizationController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/NotifierController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/NotifierController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/PresetBuildController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/ProfileController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/ProfileController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RepairController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RepairController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/WishlistController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/WishlistController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/AssortHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/AssortHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ContainerHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HttpServerHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/Ixyz.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSenderType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSentResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ItemAddedResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/14AfterDBLoadHook/types/services/GiftService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/14AfterDBLoadHook/types/services/PlayerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PlayerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/14AfterDBLoadHook/types/utils/RagfairOfferHolder.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/14AfterDBLoadHook/types/utils/Watermark.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/Watermark.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/BundleCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/15HttpListenerExample/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/NoteCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/15HttpListenerExample/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/QuestCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/RepairCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/TradeCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/CustomizationController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/CustomizationController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/NotifierController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/NotifierController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/PresetBuildController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/ProfileController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/ProfileController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/RepairController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RepairController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/15HttpListenerExample/types/controllers/WishlistController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/WishlistController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/di/Router.d.ts b/TypeScript/15HttpListenerExample/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/15HttpListenerExample/types/di/Router.d.ts +++ b/TypeScript/15HttpListenerExample/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/AssortHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/AssortHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/15HttpListenerExample/types/helpers/ContainerHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/15HttpListenerExample/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/helpers/HttpServerHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/Ixyz.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/GiftSenderType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/GiftSentResult.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ItemAddedResult.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts b/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/15HttpListenerExample/types/services/GiftService.d.ts b/TypeScript/15HttpListenerExample/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts b/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/15HttpListenerExample/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/15HttpListenerExample/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/15HttpListenerExample/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/15HttpListenerExample/types/services/PlayerService.d.ts b/TypeScript/15HttpListenerExample/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/15HttpListenerExample/types/services/PlayerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts b/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/utils/DatabaseImporter.d.ts b/TypeScript/15HttpListenerExample/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/15HttpListenerExample/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/15HttpListenerExample/types/utils/RagfairOfferHolder.d.ts b/TypeScript/15HttpListenerExample/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/15HttpListenerExample/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts b/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/15HttpListenerExample/types/utils/Watermark.d.ts b/TypeScript/15HttpListenerExample/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/15HttpListenerExample/types/utils/Watermark.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/16ImporterUtil/types/callbacks/BundleCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/16ImporterUtil/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/16ImporterUtil/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/NoteCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/16ImporterUtil/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/QuestCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/RepairCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/TradeCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/16ImporterUtil/types/controllers/CustomizationController.d.ts b/TypeScript/16ImporterUtil/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/16ImporterUtil/types/controllers/CustomizationController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/16ImporterUtil/types/controllers/NotifierController.d.ts b/TypeScript/16ImporterUtil/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/16ImporterUtil/types/controllers/NotifierController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/16ImporterUtil/types/controllers/PresetBuildController.d.ts b/TypeScript/16ImporterUtil/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/16ImporterUtil/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/controllers/ProfileController.d.ts b/TypeScript/16ImporterUtil/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/16ImporterUtil/types/controllers/ProfileController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/16ImporterUtil/types/controllers/RepairController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RepairController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts b/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/16ImporterUtil/types/controllers/WishlistController.d.ts b/TypeScript/16ImporterUtil/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/16ImporterUtil/types/controllers/WishlistController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/di/Router.d.ts b/TypeScript/16ImporterUtil/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/16ImporterUtil/types/di/Router.d.ts +++ b/TypeScript/16ImporterUtil/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/AssortHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/16ImporterUtil/types/helpers/AssortHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/16ImporterUtil/types/helpers/ContainerHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/16ImporterUtil/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/16ImporterUtil/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/helpers/HttpServerHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/Ixyz.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts b/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts b/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/GiftSenderType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/GiftSentResult.d.ts b/TypeScript/16ImporterUtil/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/ItemAddedResult.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/16ImporterUtil/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/16ImporterUtil/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts b/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/16ImporterUtil/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/16ImporterUtil/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/16ImporterUtil/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/16ImporterUtil/types/services/GiftService.d.ts b/TypeScript/16ImporterUtil/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts b/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/16ImporterUtil/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/16ImporterUtil/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/16ImporterUtil/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/16ImporterUtil/types/services/PlayerService.d.ts b/TypeScript/16ImporterUtil/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/16ImporterUtil/types/services/PlayerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts b/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/utils/DatabaseImporter.d.ts b/TypeScript/16ImporterUtil/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/16ImporterUtil/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/16ImporterUtil/types/utils/RagfairOfferHolder.d.ts b/TypeScript/16ImporterUtil/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/16ImporterUtil/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/16ImporterUtil/types/utils/VFS.d.ts b/TypeScript/16ImporterUtil/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/16ImporterUtil/types/utils/VFS.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/16ImporterUtil/types/utils/Watermark.d.ts b/TypeScript/16ImporterUtil/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/16ImporterUtil/types/utils/Watermark.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BundleCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NoteCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/QuestCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RepairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TradeCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/CustomizationController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/CustomizationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/NotifierController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/NotifierController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/PresetBuildController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/ProfileController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/ProfileController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepairController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WishlistController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WishlistController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/AssortHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/AssortHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ContainerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HttpServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/Ixyz.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSenderType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSentResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemAddedResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/GiftService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PlayerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PlayerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseImporter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/RagfairOfferHolder.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/Watermark.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/Watermark.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BundleCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NoteCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/QuestCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RepairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TradeCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/CustomizationController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/CustomizationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/NotifierController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/NotifierController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/PresetBuildController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/ProfileController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/ProfileController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepairController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WishlistController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WishlistController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/AssortHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/AssortHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ContainerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HttpServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/Ixyz.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSenderType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSentResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemAddedResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/GiftService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PlayerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PlayerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseImporter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/RagfairOfferHolder.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/Watermark.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/Watermark.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/18CustomItemService/types/callbacks/BundleCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/18CustomItemService/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/18CustomItemService/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/18CustomItemService/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/18CustomItemService/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/NoteCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/18CustomItemService/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/18CustomItemService/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/18CustomItemService/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/18CustomItemService/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/18CustomItemService/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/18CustomItemService/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/callbacks/QuestCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/18CustomItemService/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/RepairCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/18CustomItemService/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/TradeCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/18CustomItemService/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/18CustomItemService/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts b/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/18CustomItemService/types/controllers/NotifierController.d.ts b/TypeScript/18CustomItemService/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/18CustomItemService/types/controllers/NotifierController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/18CustomItemService/types/controllers/PresetBuildController.d.ts b/TypeScript/18CustomItemService/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/18CustomItemService/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/controllers/ProfileController.d.ts b/TypeScript/18CustomItemService/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/18CustomItemService/types/controllers/ProfileController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/18CustomItemService/types/controllers/RepairController.d.ts b/TypeScript/18CustomItemService/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/18CustomItemService/types/controllers/RepairController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts b/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts b/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/18CustomItemService/types/controllers/WishlistController.d.ts b/TypeScript/18CustomItemService/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/18CustomItemService/types/controllers/WishlistController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/di/Router.d.ts b/TypeScript/18CustomItemService/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/18CustomItemService/types/di/Router.d.ts +++ b/TypeScript/18CustomItemService/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/18CustomItemService/types/helpers/AssortHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/18CustomItemService/types/helpers/AssortHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/18CustomItemService/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/18CustomItemService/types/helpers/ContainerHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/18CustomItemService/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/18CustomItemService/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/18CustomItemService/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/helpers/HttpServerHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/18CustomItemService/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts b/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts +++ b/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts b/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/Ixyz.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts b/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/18CustomItemService/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/18CustomItemService/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts b/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts b/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/18CustomItemService/types/models/enums/GiftSenderType.d.ts b/TypeScript/18CustomItemService/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/GiftSentResult.d.ts b/TypeScript/18CustomItemService/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/18CustomItemService/types/models/enums/ItemAddedResult.d.ts b/TypeScript/18CustomItemService/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/18CustomItemService/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/18CustomItemService/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts b/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/18CustomItemService/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/18CustomItemService/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts b/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts b/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/18CustomItemService/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/18CustomItemService/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/18CustomItemService/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/18CustomItemService/types/services/FenceService.d.ts b/TypeScript/18CustomItemService/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/18CustomItemService/types/services/FenceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/18CustomItemService/types/services/GiftService.d.ts b/TypeScript/18CustomItemService/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/18CustomItemService/types/services/MailSendService.d.ts b/TypeScript/18CustomItemService/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/18CustomItemService/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/18CustomItemService/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/18CustomItemService/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/18CustomItemService/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/18CustomItemService/types/services/PlayerService.d.ts b/TypeScript/18CustomItemService/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/18CustomItemService/types/services/PlayerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts b/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/18CustomItemService/types/services/RepairService.d.ts b/TypeScript/18CustomItemService/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/18CustomItemService/types/services/RepairService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/utils/DatabaseImporter.d.ts b/TypeScript/18CustomItemService/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/18CustomItemService/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/18CustomItemService/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/18CustomItemService/types/utils/RagfairOfferHolder.d.ts b/TypeScript/18CustomItemService/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/18CustomItemService/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/18CustomItemService/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/18CustomItemService/types/utils/VFS.d.ts b/TypeScript/18CustomItemService/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/18CustomItemService/types/utils/VFS.d.ts +++ b/TypeScript/18CustomItemService/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/18CustomItemService/types/utils/Watermark.d.ts b/TypeScript/18CustomItemService/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/18CustomItemService/types/utils/Watermark.d.ts +++ b/TypeScript/18CustomItemService/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 463ab6d..7ca91f9 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Quest, Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -78,6 +78,7 @@ export declare class InRaidHelper { * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts index bf3d9d8..87e0173 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts @@ -71,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 235499c..418626d 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -1,5 +1,6 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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"; @@ -7,6 +8,7 @@ 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -18,17 +20,20 @@ export declare class ProfileFixerService { protected watermark: Watermark; protected hideoutHelper: HideoutHelper; protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; protected localisationService: LocalisationService; protected timeUtil: TimeUtil; protected 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); + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index 463ab6d..7ca91f9 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Quest, Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -78,6 +78,7 @@ export declare class InRaidHelper { * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts index bf3d9d8..87e0173 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts @@ -71,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 235499c..418626d 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -1,5 +1,6 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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"; @@ -7,6 +8,7 @@ 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -18,17 +20,20 @@ export declare class ProfileFixerService { protected watermark: Watermark; protected hideoutHelper: HideoutHelper; protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; protected localisationService: LocalisationService; protected timeUtil: TimeUtil; protected 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); + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index 463ab6d..7ca91f9 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Quest, Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -78,6 +78,7 @@ export declare class InRaidHelper { * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts index bf3d9d8..87e0173 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -71,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 235499c..418626d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -1,5 +1,6 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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"; @@ -7,6 +8,7 @@ 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; @@ -18,17 +20,20 @@ export declare class ProfileFixerService { protected watermark: Watermark; protected hideoutHelper: HideoutHelper; protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; protected localisationService: LocalisationService; protected timeUtil: TimeUtil; protected 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); + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/Ixyz.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSenderType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSentResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ItemAddedResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/4UseACustomConfigFile/types/services/GiftService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/4UseACustomConfigFile/types/utils/RagfairOfferHolder.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/di/Router.d.ts b/TypeScript/5ReplaceMethod/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/5ReplaceMethod/types/di/Router.d.ts +++ b/TypeScript/5ReplaceMethod/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/Ixyz.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/GiftSenderType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/GiftSentResult.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ItemAddedResult.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts b/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/5ReplaceMethod/types/services/GiftService.d.ts b/TypeScript/5ReplaceMethod/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts b/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/5ReplaceMethod/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/5ReplaceMethod/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts b/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/5ReplaceMethod/types/utils/RagfairOfferHolder.d.ts b/TypeScript/5ReplaceMethod/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/5ReplaceMethod/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts b/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/Ixyz.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSenderType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSentResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemAddedResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/6ReferenceAnotherClass/types/services/GiftService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/RagfairOfferHolder.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index 09c130c..3fe5b39 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -99,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -187,6 +183,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 diff --git a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts b/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts b/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts b/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/di/Router.d.ts b/TypeScript/7OnLoadHook/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/7OnLoadHook/types/di/Router.d.ts +++ b/TypeScript/7OnLoadHook/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts index 84e8c41..125fbcb 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/Ixyz.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts b/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/GiftSenderType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/GiftSentResult.d.ts b/TypeScript/7OnLoadHook/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/ItemAddedResult.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/7OnLoadHook/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/7OnLoadHook/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 9676977..87e0173 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,11 +105,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 */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/7OnLoadHook/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/7OnLoadHook/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/7OnLoadHook/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/7OnLoadHook/types/services/GiftService.d.ts b/TypeScript/7OnLoadHook/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts b/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/7OnLoadHook/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/7OnLoadHook/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts b/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts index ca162da..e245efa 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,12 +24,13 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/7OnLoadHook/types/utils/RagfairOfferHolder.d.ts b/TypeScript/7OnLoadHook/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/7OnLoadHook/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts b/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/di/Router.d.ts b/TypeScript/8OnUpdateHook/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/8OnUpdateHook/types/di/Router.d.ts +++ b/TypeScript/8OnUpdateHook/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/Ixyz.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/GiftSenderType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/GiftSentResult.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ItemAddedResult.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/8OnUpdateHook/types/services/GiftService.d.ts b/TypeScript/8OnUpdateHook/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts b/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/8OnUpdateHook/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/8OnUpdateHook/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts b/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/8OnUpdateHook/types/utils/RagfairOfferHolder.d.ts b/TypeScript/8OnUpdateHook/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/8OnUpdateHook/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts b/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/Watermark.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts index b7e1703..729b6cf 100644 --- a/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/BundleCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts index 75d5701..bb10f64 100644 --- a/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/CustomizationCallbacks.d.ts @@ -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; /** - * Handles client/trading/customization + * Handle client/trading/customization * @returns ISuit[] */ getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle CustomizationWear event + */ wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Handle CustomizationBuy event + */ buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts index 26f5899..fb92560 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DataCallbacks.d.ts @@ -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; /** - * Handles client/globals + * Handle client/globals * @returns IGlobals */ getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * 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; /** - * Handles client/customization + * Handle client/customization * @returns Record>; /** - * Handles client/account/customization + * Handle client/account/customization * @returns string[] */ getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/hideout/settings + * @returns IHideoutSettingsBase + */ getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/languages + */ getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData>; + /** + * Handle client/menu/locale + */ getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/locale + */ getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; /** * Handle client/hideout/qte/list diff --git a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts index 4ed6171..23cb707 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts @@ -1,7 +1,7 @@ import { DialogueController } from "../controllers/DialogueController"; import { OnUpdate } from "../di/OnUpdate"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; -import { IAcceptFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; +import { IAcceptFriendRequestData, ICancelFriendRequestData } from "../models/eft/dialog/IAcceptFriendRequestData"; import { IChatServer } from "../models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "../models/eft/dialog/IClearMailMessageRequest"; import { IDeleteFriendRequest } from "../models/eft/dialog/IDeleteFriendRequest"; @@ -33,13 +33,13 @@ export declare class DialogueCallbacks implements OnUpdate { protected dialogueController: DialogueController; constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController); /** - * Handles client/friend/list + * Handle client/friend/list * @returns IGetFriendListDataResponse */ getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/chatServer/list - * @returns + * Handle client/chatServer/list + * @returns IChatServer[] */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ @@ -50,21 +50,47 @@ export declare class DialogueCallbacks implements OnUpdate { getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/pin */ pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/unpin */ unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/dialog/read */ setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; /** - * Handles client/mail/dialog/getAllAttachments + * Handle client/mail/dialog/getAllAttachments * @returns IGetAllAttachmentsResponse */ getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/mail/msg/send */ + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; /** Handle client/friend/request/list/outbox */ listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/list/inbox + */ listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/send + */ sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/accept + */ acceptFriendRequest(url: string, request: IAcceptFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/friend/request/cancel + */ + cancelFriendRequest(url: string, request: ICancelFriendRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/delete */ deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; + /** Handle client/friend/ignore/set */ + ignoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; + /** Handle client/friend/ignore/remove */ + unIgnoreFriend(url: string, request: { + uid: string; + }, sessionID: string): any; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts index a1ce037..aa80036 100644 --- a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts @@ -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"; @@ -41,8 +42,17 @@ declare class GameCallbacks { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/server/list + */ getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): any; + /** + * Handle client/match/group/current + */ + getCurrentGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/checkVersion + */ validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/keepalive diff --git a/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts index d0247f9..efd0444 100644 --- a/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/HideoutCallbacks.d.ts @@ -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; /** diff --git a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts index 918bfaf..d341956 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InraidCallbacks.d.ts @@ -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 diff --git a/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts index aea0756..450a2fa 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InsuranceCallbacks.d.ts @@ -23,7 +23,7 @@ export declare class InsuranceCallbacks implements OnUpdate { */ getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData; /** - * Handle Insure + * Handle Insure event * @returns IItemEventRouterResponse */ insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts index 46bf6fd..a182127 100644 --- a/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/InventoryCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts index 6e0b538..da0d7cc 100644 --- a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts @@ -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; + /** Handle client/location/getLocalloot */ getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/location/getAirdropLoot */ getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts index b9341fd..0ed7d37 100644 --- a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts @@ -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; /** Handle client/match/group/invite/accept */ acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; @@ -39,21 +42,32 @@ export declare class MatchCallbacks { cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + /** 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; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle match/group/start_game */ joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** + * @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; + /** Handle client/match/group/create */ createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/match/group/delete */ deleteGroup(url: string, info: any, sessionID: string): INullResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** 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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts index d39d400..cb1cbc8 100644 --- a/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/NoteCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts index fab325b..ca94ff4 100644 --- a/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/NotifierCallbacks.d.ts @@ -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; + /** Handle client/notifier/channel/create */ createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/game/profile/select diff --git a/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts index 541715a..541714d 100644 --- a/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/PresetBuildCallbacks.d.ts @@ -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; + /** Handle SaveBuild event */ saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; + /** Handle RemoveBuild event*/ removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; } diff --git a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts index 9a5848e..77f6a27 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ProfileCallbacks.d.ts @@ -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; /** + * 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; /** + * 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; /** * 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; + /** + * Handle client/game/profile/nickname/validate + */ validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/profile/nickname/reserved + */ getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** + * 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; + /** + * Handle client/profile/settings + */ getProfileSettings(url: string, info: IGetProfileSettingsRequest, sessionId: string): IGetBodyResponseData; + /** + * Handle client/game/profile/search + */ searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle launcher/profile/info + */ getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; + /** + * Handle /launcher/profiles + */ + getAllMiniProfiles(url: string, info: IEmptyRequestData, sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts index 2a3eb20..b3b37dd 100644 --- a/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/QuestCallbacks.d.ts @@ -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; + /** + * Handle client/repeatalbeQuests/activityPeriods + */ activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts index 97713e7..1f37b07 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts @@ -32,16 +32,25 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate { constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise; + /** + * Handle client/ragfair/search + * Handle client/ragfair/find + */ search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/ragfair/itemMarketPrice */ getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData; + /** 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>; - onUpdate(timeSinceLastRun: number): Promise; + /** Handle client/reports/ragfair/send */ sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts index 14edeeb..283e0a3 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RepairCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts index 4291da8..8351e50 100644 --- a/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/TradeCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts index 1e75add..4097e00 100644 --- a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts @@ -12,7 +12,10 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { onLoad(): Promise; onUpdate(): Promise; getRoute(): string; + /** Handle client/trading/api/traderSettings */ getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTrader */ getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts index c2cc2a8..a118cc8 100644 --- a/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/WishlistCallbacks.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index eebe85f..bbdf519 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -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 */ diff --git a/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts b/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts index 8735cae..f38feae 100644 --- a/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/CustomizationController.d.ts @@ -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[]; diff --git a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts index 577375d..5904c1a 100644 --- a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts @@ -1,18 +1,39 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; 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 { MessageType } from "../models/enums/MessageType"; +import { ILogger } from "../models/spt/utils/ILogger"; import { SaveServer } from "../servers/SaveServer"; +import { GiftService } from "../services/GiftService"; +import { MailSendService } from "../services/MailSendService"; +import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { + protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; - constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper); + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; + protected mailSendService: MailSendService; + protected giftService: GiftService; + protected hashUtil: HashUtil; + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + /** 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,15 +48,37 @@ export declare class DialogueController { */ getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; /** + * Get the users involved in a dialog (player + other party) + * @param dialog The dialog to check for users + * @param messageType What type of message is being sent + * @param sessionID Player id + * @returns IUserDialogInfo array + */ + getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[]; + /** + * 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; - protected getProfilesForMail(pmcProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; + 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; + /** + * Get the users involved in a mail between two entities + * @param fullProfile Player profile + * @param dialogUsers The participants of the mail + * @returns IUserDialogInfo array + */ + protected getProfilesForMail(fullProfile: IAkiProfile, dialogUsers: IUserDialogInfo[]): IUserDialogInfo[]; /** * Get a count of messages with attachments from a particular dialog * @param sessionID Session id @@ -49,16 +92,39 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - setRead(dialogueIDs: string[], sessionID: string): void; /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + 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 + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; + /** client/mail/msg/send */ + sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ + protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; + protected getSptFriendData(friendId?: string): IUserDialogInfo; /** * Get messages from a specific dialog that have items not expired * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index 18c8091..6d0ce18 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -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"; @@ -17,6 +18,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { CustomLocationWaveService } from "../services/CustomLocationWaveService"; +import { GiftService } from "../services/GiftService"; import { LocalisationService } from "../services/LocalisationService"; import { OpenZoneService } from "../services/OpenZoneService"; import { ProfileFixerService } from "../services/ProfileFixerService"; @@ -39,14 +41,40 @@ export declare class GameController { protected customLocationWaveService: CustomLocationWaveService; protected openZoneService: OpenZoneService; protected seasonalEventService: SeasonalEventService; + protected giftService: GiftService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected os: any; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Handle client/game/start + */ gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */ + protected adjustMapBotLimits(): void; + /** + * Handle client/game/config + */ + getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/server/list + */ + getServer(sessionId: string): IServerDetails[]; + /** + * Handle client/match/group/current + */ + getCurrentGroup(sessionId: string): ICurrentGroupResponse; + /** + * Handle client/checkVersion + */ + getValidGameVersion(sessionId: string): ICheckVersionResponse; + /** + * Handle client/game/keepalive + */ + getKeepAlive(sessionId: string): IGameKeepAliveResponse; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ @@ -70,6 +98,11 @@ export declare class GameController { * Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions */ protected fixRoguesSpawningInstantlyOnLighthouse(): void; + /** + * Send starting gifts to profile after x days + * @param pmcProfile Profile to add gifts to + */ + protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void; /** * Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long */ @@ -79,6 +112,10 @@ export declare class GameController { * @param fullProfile Profile to add mod details to */ protected saveActiveModsToProfile(fullProfile: IAkiProfile): void; + /** + * Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json + */ + protected validateQuestAssortUnlocksExist(): void; /** * Add the logged in players name to PMC name pool * @param pmcProfile @@ -93,8 +130,4 @@ export declare class GameController { */ protected adjustLabsRaiderSpawnRate(): void; protected logProfileDetails(fullProfile: IAkiProfile): void; - getGameConfig(sessionID: string): IGameConfigResponse; - getServer(): IServerDetails[]; - getCurrentGroup(sessionId: string): ICurrentGroupResponse; - getValidGameVersion(): ICheckVersionResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts index 7c149cc..1938297 100644 --- a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { EventOutputHolder } from "../routers/EventOutputHolder"; import { LocalisationService } from "../services/LocalisationService"; import { PaymentService } from "../services/PaymentService"; +import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { JsonUtil } from "../utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; @@ -21,8 +22,9 @@ export declare class HealthController { protected paymentService: PaymentService; protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; + protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); + constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); /** * stores in-raid player health * @param pmcData Player profile @@ -40,6 +42,7 @@ export declare class HealthController { */ offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle Eat event * Consume food/water outside of a raid * @param pmcData Player profile * @param body request Object @@ -48,6 +51,7 @@ export declare class HealthController { */ offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; /** + * Handle RestoreHealth event * Occurs on post-raid healing page * @param pmcData player profile * @param healthTreatmentRequest Request data from client diff --git a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts index dd4235f..c8e82f0 100644 --- a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index 70c1dab..f224662 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -10,6 +10,7 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; +import { PlayerRaidEndState } from "../models/enums/PlayerRaidEndState"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -52,6 +53,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 @@ -98,7 +100,7 @@ export declare class InraidController { * @param statusOnExit exit value from offraidData object * @returns true if dead */ - protected isPlayerDead(statusOnExit: string): boolean; + protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean; /** * Mark inventory items as FiR if player survived raid, otherwise remove FiR from them * @param offraidData Save Progress Request diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index ccbd0a0..ae85e96 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -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 diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index cf8d81a..3fe5b39 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -4,8 +4,8 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; -import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData"; import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData"; @@ -44,6 +44,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +52,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId @@ -63,6 +64,12 @@ export declare class InventoryController { * @returns IItemEventRouterResponse */ moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; + /** + * Get a event router response with inventory trader message + * @param output Item event router response + * @returns Item event router response + */ + protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Remove Item from Profile * Deep tree item deletion, also removes items from insurance list @@ -93,11 +100,6 @@ export declare class InventoryController { * its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment */ swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - /** - * Give Item - * its used for "add" item like gifts etc. - */ - addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; /** * Handles folding of Weapons */ @@ -181,6 +183,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 diff --git a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts index bd9815c..156936e 100644 --- a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -27,19 +27,33 @@ 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; + /** + * Generate a maps base location without loot + * @param name Map name + * @returns ILocationBase + */ + protected generate(name: string): ILocationBase; + /** + * Handle client/locations * Get all maps base location properties without loot data + * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ - generateAll(): ILocationsGenerateAllResponse; + generateAll(sessionId: string): ILocationsGenerateAllResponse; /** + * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index f7418bf..1535ee6 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -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 */ diff --git a/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts b/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts index 31d7bfe..de354ec 100644 --- a/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/NotifierController.d.ts @@ -18,5 +18,6 @@ export declare class NotifierController { */ notifyAsync(sessionID: string): Promise; getServer(sessionID: string): string; + /** Handle client/notifier/channel/create */ getChannel(sessionID: string): INotifierChannel; } diff --git a/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts b/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts index 65ae0c4..563c5cc 100644 --- a/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/PresetBuildController.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts b/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts index 03d81d4..ffccdaf 100644 --- a/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/ProfileController.d.ts @@ -14,40 +14,88 @@ 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"; +import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; 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; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected profileFixerService: ProfileFixerService; + protected localisationService: LocalisationService; + protected mailSendService: MailSendService; protected playerScavGenerator: PlayerScavGenerator; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; 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, localisationService: LocalisationService, mailSendService: MailSendService, 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[]; } diff --git a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts index 48efeef..3e8b7dd 100644 --- a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts @@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { QuestConditionHelper } from "../helpers/QuestConditionHelper"; import { QuestHelper } from "../helpers/QuestHelper"; +import { TraderHelper } from "../helpers/TraderHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest"; @@ -18,7 +19,9 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -29,22 +32,39 @@ export declare class QuestController { protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected dialogueHelper: DialogueHelper; + protected mailSendService: MailSendService; protected profileHelper: ProfileHelper; + protected traderHelper: TraderHelper; protected questHelper: QuestHelper; protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** + * Handle client/quest/list * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) * @param sessionID session id * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) @@ -52,6 +72,7 @@ export declare class QuestController { */ protected questIsForOtherSide(playerSide: string, questId: string): boolean; /** + * Handle QuestAccept event * Handle the client accepting a quest and starting it * Send starting rewards if any to player and * Send start notification if any to player @@ -79,9 +100,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 @@ -110,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile @@ -118,7 +140,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 diff --git a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts index b94ad20..4dcb4b2 100644 --- a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts @@ -120,7 +120,7 @@ export declare class RagfairController { /** * List item(s) on flea for sale * @param pmcData Player profile - * @param offerRequest Flea list creatio offer + * @param offerRequest Flea list creation offer * @param sessionID Session id * @returns IItemEventRouterResponse */ diff --git a/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts index fd8ff72..b19b1b7 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepairController.d.ts @@ -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 diff --git a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts index 171062d..e9d2e56 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts @@ -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, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest; + protected generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record, 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(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + protected probabilityObjectArray(configArrayInput: ProbabilityObject[]): ProbabilityObjectArray; + /** + * 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; } diff --git a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts index 8a0630b..c201791 100644 --- a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts index 007901b..5e31c43 100644 --- a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts index 631a90c..eeace8c 100644 --- a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts @@ -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) diff --git a/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts b/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts index 60c4a15..53a240f 100644 --- a/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WishlistController.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/di/Router.d.ts b/TypeScript/9RouterHooks/types/di/Router.d.ts index 2fb98e0..d2b4209 100644 --- a/TypeScript/9RouterHooks/types/di/Router.d.ts +++ b/TypeScript/9RouterHooks/types/di/Router.d.ts @@ -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 { diff --git a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts index 751e6e6..56005a5 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index c847d4d..5e7df96 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached @@ -64,6 +70,7 @@ export declare class BotLootGenerator { */ protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void; /** + * @deprecated replaced by getRandomItemFromPoolByRole() * Get a random item from the pool parameter using the biasedRandomNumber system * @param pool pool of items to pick an item from * @param isPmc is the bot being created a pmc @@ -71,11 +78,25 @@ export declare class BotLootGenerator { */ protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem; /** + * Get a random item from the pool parameter using the biasedRandomNumber system + * @param pool pool of items to pick an item from + * @param isPmc is the bot being created a pmc + * @returns ITemplateItem object + */ + protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem; + /** + * @deprecated Replaced by getBotLootNValueByRole() * Get the loot nvalue from botconfig * @param isPmc if true the pmc nvalue is returned * @returns nvalue as number */ protected getBotLootNValue(isPmc: boolean): number; + /** + * Get the loot nvalue from botconfig + * @param botRole role of bot e.g. assault/sptBear + * @returns nvalue as number + */ + protected getBotLootNValueByRole(botRole: string): number; /** * Update item limit array to contain items that have a limit * All values are set to 0 diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index 3e9fe30..6c28462 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -67,6 +67,13 @@ export declare class BotWeaponGenerator { * @returns GenerateWeaponResult object */ generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + /** + * Insert a cartridge into a weapon + * @param weaponWithModsArray Weapon and mods + * @param ammoTpl Cartridge to add to weapon + * @param desiredSlotId name of slot, e.g. patron_in_weapon + */ + protected addCartridgeToChamber(weaponWithModsArray: Item[], ammoTpl: string, desiredSlotId: string): void; /** * Create array with weapon base as only element and * add additional properties based on weapon type diff --git a/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts index 387df3a..486c4bd 100644 --- a/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts @@ -6,15 +6,17 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { ItemFilterService } from "../services/ItemFilterService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; protected itemFilterService: ItemFilterService; + protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Create base fence assorts dynamically and store in db */ diff --git a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts index 04b1599..d5bf61c 100644 --- a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts @@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { RagfairServerHelper } from "../helpers/RagfairServerHelper"; -import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot"; +import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot"; import { Item } from "../models/eft/common/tables/IItem"; import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; @@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService"; import { JsonUtil } from "../utils/JsonUtil"; import { MathUtil } from "../utils/MathUtil"; import { ObjectId } from "../utils/ObjectId"; -import { RandomUtil } from "../utils/RandomUtil"; +import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil"; export interface IContainerItem { items: Item[]; width: number; @@ -35,15 +35,38 @@ export declare class LocationGenerator { protected locationConfig: ILocationConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); /** - * Choose loot to put into a static container - * @param containerIn - * @param staticForced - * @param staticLootDist - * @param staticAmmoDist + * Choose loot to put into a static container based on weighting + * Handle forced items + seasonal item removal when not in season + * @param staticContainer The container itself we will add loot to + * @param staticForced Loot we need to force into the container + * @param staticLootDist staticLoot.json + * @param staticAmmoDist staticAmmo.json * @param locationName Name of the map to generate static loot for * @returns IStaticContainerProps */ - generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; + /** + * Get a 2d grid of a containers item slots + * @param containerTpl Tpl id of the container + * @returns number[][] + */ + protected getContainerMapping(containerTpl: string): number[][]; + /** + * Look up a containers itemcountDistribution data and choose an item count based on the found weights + * @param containerTypeId Container to get item count for + * @param staticLootDist staticLoot.json + * @param locationName Map name (to get per-map multiplier for from config) + * @returns item count + */ + protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record, locationName: string): number; + /** + * Get all possible loot items that can be placed into a container + * Do not add seasonal items if found + current date is inside seasonal event + * @param containerTypeId Contianer to get possible loot for + * @param staticLootDist staticLoot.json + * @returns ProbabilityObjectArray of item tpls + probabilty + */ + protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record): ProbabilityObjectArray; protected getLooseLootMultiplerForLocation(location: string): number; protected getStaticLootMultiplerForLocation(location: string): number; /** diff --git a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts index 30da765..fd7f2c2 100644 --- a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts @@ -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, 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 diff --git a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts index 630e863..b26b6e1 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts @@ -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 diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 35fceff..a627191 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -48,7 +48,30 @@ export declare class RagfairOfferGenerator { price: number; }[]; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); - createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create a flea offer and store it in the Ragfair server offers array + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; + /** + * Create an offer object ready to send to ragfairOfferService.addOffer() + * @param userID Owner of the offer + * @param time Time offer is listed at + * @param items Items in the offer + * @param barterScheme Cost of item (currency or barter) + * @param loyalLevel Loyalty level needed to buy item + * @param price Price of offer + * @param sellInOnePiece Set StackObjectsCount to 1 + * @returns IRagfairOffer + */ + protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; /** * Calculate the offer price that's listed on the flea listing * @param offerRequirements barter requirements for offer @@ -69,8 +92,18 @@ export declare class RagfairOfferGenerator { * @returns count of roubles */ protected calculateRoublePrice(currencyCount: number, currencyType: string): number; - protected getTraderId(userID: string): string; - protected getRating(userID: string): number; + /** + * Check userId, if its a player, return their pmc _id, otherwise return userId parameter + * @param userId Users Id to check + * @returns Users Id + */ + protected getTraderId(userId: string): string; + /** + * Get a flea trading rating for the passed in user + * @param userId User to get flea rating of + * @returns Flea rating value + */ + protected getRating(userId: string): number; /** * Is the offers user rating growing * @param userID user to check rating of @@ -89,13 +122,20 @@ export declare class RagfairOfferGenerator { * @param expiredOffers optional, expired offers to regenerate */ generateDynamicOffers(expiredOffers?: Item[]): Promise; + /** + * + * @param assortItemIndex Index of assort item + * @param assortItemsToProcess Item array containing index + * @param expiredOffers Currently expired offers on flea + * @param config Ragfair dynamic config + */ protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise; /** * Create one flea offer for a specific item * @param items Item to create offer for * @param isPreset Is item a weapon preset * @param itemDetails raw db item details - * @returns + * @returns Item array */ protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise; /** @@ -142,7 +182,7 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer - * @returns barter scheme + * @returns Barter scheme */ protected createBarterRequirement(offerItems: Item[]): IBarterScheme[]; /** @@ -159,16 +199,4 @@ export declare class RagfairOfferGenerator { * @returns Barter scheme for offer */ protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[]; - /** - * Create a flea offer and store it in the Ragfair server offers array - * @param userID owner of the offer - * @param time time offer is put up - * @param items items in the offer - * @param barterScheme cost of item (currency or barter) - * @param loyalLevel Loyalty level needed to buy item - * @param price price of offer - * @param sellInOnePiece - * @returns Ragfair offer - */ - createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; } diff --git a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index a7f4302..4ba1888 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -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; /** * diff --git a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts index 65d2c76..2e2403c 100644 --- a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts @@ -16,6 +16,11 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + /** + * Get current + raid datetime and format into correct BSG format and return + * @param data Weather data + * @returns IWeatherData + */ calculateGameTime(data: IWeatherData): IWeatherData; /** * Get server uptime seconds multiplied by a multiplier and add to current time as seconds @@ -33,7 +38,7 @@ export declare class WeatherGenerator { /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style - * @returns + * @returns Time formatted in BSG format */ protected getBSGFormattedTime(date: Date): string; /** diff --git a/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts index 3c2ee93..125fbcb 100644 --- a/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ContainerHelper.d.ts @@ -6,7 +6,35 @@ export declare class FindSlotResult { constructor(success?: boolean, x?: any, y?: any, rotation?: boolean); } export declare class ContainerHelper { - protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Finds a slot for an item in a given 2D container map + * @param container2D Array of container with slots filled/free + * @param itemWidth Width of item + * @param itemHeight Height of item + * @returns Location to place item in container + */ findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult; - fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any; + /** + * Find a slot inside a container an item can be placed in + * @param container2D Container to find space in + * @param containerX Container x size + * @param containerY Container y size + * @param x ??? + * @param y ??? + * @param itemW Items width + * @param itemH Items height + * @returns True - slot found + */ + protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean; + /** + * Find a free slot for an item to be placed at + * @param container2D Container to palce item in + * @param x Container x size + * @param y Container y size + * @param itemW Items width + * @param itemH Items height + * @param rotate is item rotated + * @returns Location to place item + */ + fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][]; } diff --git a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts index 898bf8e..6a8adc5 100644 --- a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts @@ -20,21 +20,13 @@ export declare class DialogueHelper { protected itemHelper: ItemHelper; constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); /** - * Create basic message context template - * @param templateId - * @param messageType - * @param maxStoreTime - * @returns + * @deprecated Use MailSendService.sendMessage() or helpers */ - createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent; + createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent; /** - * Add a templated message to the dialogue. - * @param dialogueID - * @param messageContent - * @param sessionID - * @param rewards + * @deprecated Use MailSendService.sendMessage() or helpers */ - addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void; + addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void; /** * Get the preview contents of the last message in a dialogue. * @param dialogue diff --git a/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts index 7122376..671559f 100644 --- a/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/DurabilityLimitsHelper.d.ts @@ -9,9 +9,35 @@ export declare class DurabilityLimitsHelper { protected configServer: ConfigServer; protected botConfig: IBotConfig; constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer); + /** + * Get max durability for a weapon based on bot role + * @param itemTemplate UNUSED - Item to get durability for + * @param botRole Role of bot to get max durability for + * @returns Max durability of weapon + */ getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get max durability value for armor based on bot role + * @param itemTemplate Item to get max durability for + * @param botRole Role of bot to get max durability for + * @returns max durability + */ getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number; + /** + * Get randomised current weapon durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of weapon + * @returns Current weapon durability + */ getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; + /** + * Get randomised current armor durability by bot role + * @param itemTemplate Unused - Item to get current durability of + * @param botRole Role of bot to get current durability for + * @param maxDurability Max durability of armor + * @returns Current armor durability + */ getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number; protected generateMaxWeaponDurability(botRole: string): number; protected generateMaxPmcArmorDurability(itemMaxDurability: number): number; diff --git a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts index dd9ce09..856c23a 100644 --- a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts @@ -14,6 +14,9 @@ export declare class HandbookHelper { protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; constructor(databaseServer: DatabaseServer); + /** + * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + */ hydrateLookup(): void; /** * Get price from internal cache, if cache empty look up price directly in handbook (expensive) @@ -23,18 +26,23 @@ export declare class HandbookHelper { */ getTemplatePrice(tpl: string): number; /** - * all items in template with the given parent category - * @param x + * Get all items in template with the given parent category + * @param parentId * @returns string array */ - templatesWithParent(x: string): string[]; + templatesWithParent(parentId: string): string[]; /** * Does category exist in handbook cache * @param category * @returns true if exists in cache */ isCategory(category: string): boolean; - childrenCategories(x: string): string[]; + /** + * Get all items associated with a categories parent + * @param categoryParent + * @returns string array + */ + childrenCategories(categoryParent: string): string[]; /** * Convert non-roubles into roubles * @param nonRoubleCurrencyCount Currency count to convert diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index 7a6d41d..3694a6e 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -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): boolean; } diff --git a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts index c718865..e9d3746 100644 --- a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts @@ -52,6 +52,11 @@ export declare class HideoutHelper { * with all the constants. */ initProduction(recipeId: string, productionTime: number): Production; + /** + * Is the provided object a Production type + * @param productive + * @returns + */ isProductionType(productive: Productive): productive is Production; applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; /** @@ -189,16 +194,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +211,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts index c6e5296..b05cbdf 100644 --- a/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HttpServerHelper.d.ts @@ -16,8 +16,17 @@ export declare class HttpServerHelper { }; constructor(configServer: ConfigServer); getMimeText(key: string): string; + /** + * Combine ip and port into url + * @returns url + */ buildUrl(): string; + /** + * Prepend http to the url:port + * @returns URI + */ getBackendUrl(): string; + /** Get websocket url + port */ getWebsocketUrl(): string; sendTextJson(resp: any, output: any): void; } diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index 0de950c..7ca91f9 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,14 +21,15 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** - * Should quest items be removed from player inventory on death + * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory */ removeQuestItemsOnDeath(): boolean; @@ -61,12 +63,22 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; + protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile * @param saveProgressRequest post-raid request * @param profileData player profile on server */ protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; + protected applyTraderStandingAdjustments(preRaid: Record, postRaid: Record): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index d0bc8ea..ff96a23 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -53,11 +53,12 @@ export declare class InventoryHelper { * @param callback Code to execute later (function) * @param foundInRaid Will results added to inventory be set as found in raid * @param addUpd Additional upd properties for items being added to inventory + * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { (): void; - }, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; + }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box @@ -75,7 +76,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 @@ -99,8 +100,9 @@ export declare class InventoryHelper { * @returns Array */ protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][]; - protected getStashType(sessionID: string): string; + protected getSortingTableSlotMap(pmcData: IPmcData): number[][]; protected getPlayerStashSize(sessionID: string): Record; + protected getStashType(sessionID: string): string; /** * Internal helper function to transfer an item from one profile to another. * fromProfileData: Profile of the source. diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 98fe95e..47fe9ab 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -51,11 +51,22 @@ declare class ItemHelper { /** * Returns the item price based on the handbook or as a fallback from the prices.json if the item is not * found in the handbook. If the price can't be found at all return 0 - * - * @param {string} tpl the item template to check - * @returns {integer} The price of the item or 0 if not found + * @param tpl Item to look price up of + * @returns Price in roubles */ getItemPrice(tpl: string): number; + /** + * Get the static (handbook) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (0 if not found) + */ + getStaticItemPrice(tpl: string): number; + /** + * Get the dynamic (flea) price in roubles for an item by tpl + * @param tpl Items tpl id to look up price + * @returns Price in roubles (undefined if not found) + */ + getDynamicItemPrice(tpl: string): number; fixItemStackCount(item: Item): Item; /** * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. @@ -186,14 +197,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts index 738b69a..d824fb2 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts @@ -9,9 +9,18 @@ export declare class NotifierHelper { protected defaultNotification: INotification; constructor(httpServerHelper: HttpServerHelper); getDefaultNotification(): INotification; - /** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */ + /** + * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside + * @param dialogueMessage Message from dialog that was sent + * @param ragfairData Ragfair data to attach to notification + * @returns + */ createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; - /** Creates a new notification with the specified dialogueMessage object. */ + /** + * Create a new notification with the specified dialogueMessage object + * @param dialogueMessage + * @returns + */ createNewMessageNotification(dialogueMessage: Message): INotification; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts index cea210e..8f84625 100644 --- a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts @@ -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; - protected defaultPresets: Record; + protected defaultPresets: Record; constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer); hydratePresetStore(input: Record): void; - getDefaultPresets(): Record; + getDefaultPresets(): Record; 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; } diff --git a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts index 91e71ae..a2fb099 100644 --- a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Stats } from "../models/eft/common/tables/IBotBase"; +import { CounterKeyValue, Stats } from "../models/eft/common/tables/IBotBase"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -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; @@ -77,4 +81,24 @@ export declare class ProfileHelper { * @returns profile without secure container */ removeSecureContainer(profile: IPmcData): IPmcData; + /** + * Flag a profile as having received a gift + * Store giftid in profile aki object + * @param playerId Player to add gift flag to + * @param giftId Gift player received + */ + addGiftReceivedFlagToProfile(playerId: string, giftId: string): void; + /** + * Check if profile has recieved a gift by id + * @param playerId Player profile to check for gift + * @param giftId Gift to check for + * @returns True if player has recieved gift previously + */ + playerHasRecievedGift(playerId: string, giftId: string): boolean; + /** + * Find Stat in profile counters and increment by one + * @param counters Counters to search for key + * @param keyToIncrement Key + */ + incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void; } diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index dcfc5ae..6bbaa0c 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -13,6 +13,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -37,9 +38,10 @@ export declare class QuestHelper { protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected traderHelper: TraderHelper; + protected mailSendService: MailSendService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer); + constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search @@ -63,6 +65,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of @@ -113,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index 41e5f85..9392c82 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -12,6 +12,7 @@ import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { LocaleService } from "../services/LocaleService"; +import { LocalisationService } from "../services/LocalisationService"; import { RagfairOfferService } from "../services/RagfairOfferService"; import { HashUtil } from "../utils/HashUtil"; import { TimeUtil } from "../utils/TimeUtil"; @@ -42,11 +43,12 @@ export declare class RagfairOfferHelper { protected ragfairHelper: RagfairHelper; protected ragfairOfferService: RagfairOfferService; protected localeService: LocaleService; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see * @param searchRequest diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts index bfe6cc3..3d73605 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts @@ -8,41 +8,67 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { SaveServer } from "../servers/SaveServer"; import { ItemFilterService } from "../services/ItemFilterService"; import { LocaleService } from "../services/LocaleService"; +import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; +import { TimeUtil } from "../utils/TimeUtil"; import { DialogueHelper } from "./DialogueHelper"; import { ItemHelper } from "./ItemHelper"; import { ProfileHelper } from "./ProfileHelper"; +import { TraderHelper } from "./TraderHelper"; /** * Helper class for common ragfair server actions */ export declare class RagfairServerHelper { protected randomUtil: RandomUtil; protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; + protected traderHelper: TraderHelper; protected jsonUtil: JsonUtil; + protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Is item valid / on blacklist / quest item * @param itemDetails * @returns boolean */ isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean; - protected isItemBlacklisted(itemTemplateId: string): boolean; - isTrader(userID: string): boolean; - isPlayer(userID: string): boolean; - returnItems(sessionID: string, items: Item[]): void; + /** + * Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic + * @param itemTemplateId Item tpl to check is blacklisted + * @returns True if its blacklsited + */ + protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean; + /** + * is supplied id a trader + * @param traderId + * @returns True if id was a trader + */ + isTrader(traderId: string): boolean; + /** + * Is this user id the logged in player + * @param userId Id to test + * @returns True is the current player + */ + isPlayer(userId: string): boolean; + /** + * Send items back to player + * @param sessionID Player to send items to + * @param returnedItems Items to send to player + */ + returnItems(sessionID: string, returnedItems: Item[]): void; calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number; /** * Choose a currency at random with bias diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts index bef1511..4157c1c 100644 --- a/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TraderHelper.d.ts @@ -1,5 +1,6 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader"; +import { Traders } from "../models/enums/Traders"; import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -106,4 +107,10 @@ export declare class TraderHelper { * @returns Rouble price */ getHighestSellToTraderPrice(tpl: string): number; + /** + * Get a trader enum key by its value + * @param traderId Traders id + * @returns Traders key + */ + getTraderById(traderId: string): Traders; } diff --git a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts index 4c7e9d6..e043b39 100644 --- a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts @@ -15,6 +15,9 @@ export declare class BundleLoader { protected jsonUtil: JsonUtil; protected bundles: Record; constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil); + /** + * Handle singleplayer/bundles + */ getBundles(local: boolean): BundleInfo[]; getBundle(key: string, local: boolean): BundleInfo; addBundles(modpath: string): void; diff --git a/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts index 1949696..a67f1c9 100644 --- a/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts @@ -36,8 +36,8 @@ export declare class PreAkiModLoader implements IModLoader { getModPath(mod: string): string; protected importMods(): Promise; /** - * Check for duplciate mods loaded, show error if duplicate mod found - * @param modPackageData dictionary of mod package.json data + * Check for duplicate mods loaded, show error if any + * @param modPackageData Dictionary of mod package.json data */ protected checkForDuplicateMods(modPackageData: Record): void; /** diff --git a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts index f1845f6..1d3c754 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts @@ -1,20 +1,22 @@ +import { Ixyz } from "./Ixyz"; import { Item } from "./tables/IItem"; export interface IGlobals { time: number; - config: Config; - bot_presets: BotPreset[]; - BotWeaponScatterings: BotWeaponScattering[]; - ItemPresets: Record; + config: IConfig; + bot_presets: IBotPreset[]; + AudioSettings: IAudioSettings; + BotWeaponScatterings: IBotWeaponScattering[]; + ItemPresets: Record; } -export interface Config { - content: Content; +export interface IConfig { + content: IContent; AimPunchMagnitude: number; WeaponSkillProgressRate: number; SkillAtrophy: boolean; - exp: Exp; + exp: IExp; t_base_looting: number; t_base_lockpicking: number; - armor: Armor; + armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; SavagePlayCooldown: number; @@ -22,7 +24,7 @@ export interface Config { MarksmanAccuracy: number; SavagePlayCooldownDevelop: number; TODSkyDate: string; - Mastering: Mastering[]; + Mastering: IMastering[]; GlobalItemPriceModifier: number; TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; @@ -36,30 +38,30 @@ export interface Config { BaseLoadTime: number; BaseUnloadTime: number; BaseCheckTime: number; - Customization: Customization; + Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; BufferZone: IBufferZone; - ArmorMaterials: ArmorMaterials; + ArmorMaterials: IArmorMaterials; LegsOverdamage: number; HandsOverdamage: number; StomachOverdamage: number; - Health: Health; - rating: Rating; - tournament: Tournament; - RagFair: RagFair; - handbook: Handbook; - FractureCausedByFalling: Probability; - FractureCausedByBulletHit: Probability; + Health: IHealth; + rating: IRating; + tournament: ITournament; + RagFair: IRagFair; + handbook: IHandbook; + FractureCausedByFalling: IProbability; + FractureCausedByBulletHit: IProbability; WAVE_COEF_LOW: number; WAVE_COEF_MID: number; WAVE_COEF_HIGH: number; WAVE_COEF_HORDE: number; - Stamina: Stamina; - StaminaRestoration: StaminaRestoration; - StaminaDrain: StaminaDrain; - RequirementReferences: RequirementReferences; - RestrictionsInRaid: RestrictionsInRaid[]; + Stamina: IStamina; + StaminaRestoration: IStaminaRestoration; + StaminaDrain: IStaminaDrain; + RequirementReferences: IRequirementReferences; + RestrictionsInRaid: IRestrictionsInRaid[]; SkillMinEffectiveness: number; SkillFatiguePerPoint: number; SkillFreshEffectiveness: number; @@ -68,25 +70,25 @@ export interface Config { SkillFatigueReset: number; DiscardLimitsEnabled: boolean; EventType: string[]; - WalkSpeed: xyz; - SprintSpeed: xyz; + WalkSpeed: Ixyz; + SprintSpeed: Ixyz; SquadSettings: ISquadSettings; SkillEnduranceWeightThreshold: number; TeamSearchingTimeout: number; - Insurance: Insurance; + Insurance: IInsurance; SkillExpPerLevel: number; GameSearchingTimeout: number; - WallContusionAbsorption: xyz; - SkillsSettings: SkillsSettings; + WallContusionAbsorption: Ixyz; + SkillsSettings: ISkillsSettings; AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: Aiming; - Malfunction: Malfunction; - Overheat: Overheat; - FenceSettings: FenceSettings; + Aiming: IAiming; + Malfunction: IMalfunction; + Overheat: IOverheat; + FenceSettings: IFenceSettings; TestValue: number; - Inertia: Inertia; - Ballistic: Ballistic; - RepairSettings: RepairSettings; + Inertia: IInertia; + Ballistic: IBallistic; + RepairSettings: IRepairSettings; } export interface IBufferZone { CustomerAccessTime: number; @@ -104,27 +106,27 @@ export interface IBuyoutRestrictions { MinFoodDrinkResource: number; MinMedsResource: number; } -export interface Content { +export interface IContent { ip: string; port: number; root: string; } -export interface Exp { - heal: Heal; - match_end: MatchEnd; - kill: Kill; - level: Level; - loot_attempts: LootAttempt[]; +export interface IExp { + heal: IHeal; + match_end: IMatchEnd; + kill: IKill; + level: ILevel; + loot_attempts: ILootAttempt[]; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; } -export interface Heal { +export interface IHeal { expForHeal: number; expForHydration: number; expForEnergy: number; } -export interface MatchEnd { +export interface IMatchEnd { README: string; survived_exp_requirement: number; survived_seconds_requirement: number; @@ -137,8 +139,8 @@ export interface MatchEnd { runnerMult: number; killedMult: number; } -export interface Kill { - combo: Combo[]; +export interface IKill { + combo: ICombo[]; victimLevelExp: number; headShotMult: number; expOnDamageAllHealth: number; @@ -146,166 +148,166 @@ export interface Kill { bloodLossToLitre: number; victimBotLevelExp: number; } -export interface Combo { +export interface ICombo { percent: number; } -export interface Level { - exp_table: ExpTable[]; +export interface ILevel { + exp_table: IExpTable[]; trade_level: number; savage_level: number; clan_level: number; mastering1: number; mastering2: number; } -export interface ExpTable { +export interface IExpTable { exp: number; } -export interface LootAttempt { +export interface ILootAttempt { k_exp: number; } -export interface Armor { - class: Class[]; +export interface IArmor { + class: IClass[]; } -export interface Class { +export interface IClass { resistance: number; } -export interface Mastering { +export interface IMastering { Name: string; Templates: string[]; Level2: number; Level3: number; } -export interface Customization { - SavageHead: SavageHead; - SavageBody: SavageBody; - SavageFeet: SavageFeet; - CustomizationVoice: CustomizationVoice[]; - BodyParts: BodyParts; +export interface ICustomization { + SavageHead: ISavageHead; + SavageBody: ISavageBody; + SavageFeet: ISavageFeet; + CustomizationVoice: ICustomizationVoice[]; + BodyParts: IBodyParts; } -export interface SavageHead { - wild_head_1: WildHead; - wild_head_2: WildHead; - wild_head_3: WildHead; - Wild_Dealmaker_head: WildHead; - Wild_Killa_head: WildHead; - bear_head: WildHead; - bear_head_1: WildHead; - usec_head_1: WildHead; - Head_BOSS_Glukhar: WildHead; - Wild_Head_nonMesh: WildHead; - Head_BOSS_Sanitar: WildHead; - wild_head_drozd: WildHead; - wild_head_misha: WildHead; - head_cultist_01: WildHead; - head_cultist_02: WildHead; - head_cultist_03: WildHead; - DefaultUsecHead: WildHead; - usec_head_3: WildHead; - usec_head_4: WildHead; - usec_head_5: WildHead; +export interface ISavageHead { + wild_head_1: IWildHead; + wild_head_2: IWildHead; + wild_head_3: IWildHead; + Wild_Dealmaker_head: IWildHead; + Wild_Killa_head: IWildHead; + bear_head: IWildHead; + bear_head_1: IWildHead; + usec_head_1: IWildHead; + Head_BOSS_Glukhar: IWildHead; + Wild_Head_nonMesh: IWildHead; + Head_BOSS_Sanitar: IWildHead; + wild_head_drozd: IWildHead; + wild_head_misha: IWildHead; + head_cultist_01: IWildHead; + head_cultist_02: IWildHead; + head_cultist_03: IWildHead; + DefaultUsecHead: IWildHead; + usec_head_3: IWildHead; + usec_head_4: IWildHead; + usec_head_5: IWildHead; } -export interface WildHead { +export interface IWildHead { head: string; isNotRandom: boolean; NotRandom: boolean; } -export interface SavageBody { - wild_body: WildBody; - wild_body_1: WildBody; - wild_body_2: WildBody; - wild_body_3: WildBody; - Wild_Dealmaker_body: WildBody; - wild_security_body_1: WildBody; - wild_security_body_2: WildBody; - wild_Killa_body: WildBody; - wild_pmcBot_body: WildBody; - wild_Shturman_body: WildBody; - wild_Gluhar_body: WildBody; - Tshirt_security_TshirtTatu_01: WildBody; - Tshirt_security_TshirtTatu_02: WildBody; - Top_security_Husky: WildBody; - Top_security_Gorka4: WildBody; - scav_kit_upper_meteor: WildBody; - wild_body_russia1: WildBody; - Top_BOSS_Sanitar: WildBody; - wild_body_motocross: WildBody; - top_cultist_01: WildBody; - top_cultist_02: WildBody; - wild_body_rainparka: WildBody; - wild_body_underarmour: WildBody; - top_boss_tagilla: WildBody; - DefaultUsecBody: WildBody; - usec_upper_acu: WildBody; - usec_upper_commando: WildBody; - usec_upper_aggressor: WildBody; - usec_upper_hoody: WildBody; - usec_upper_pcuironsight: WildBody; - usec_top_beltstaff: WildBody; - usec_upper_flexion: WildBody; - usec_upper_tier3: WildBody; - usec_upper_pcsmulticam: WildBody; - usec_upper_tier_2: WildBody; - usec_upper_infiltrator: WildBody; - user_upper_NightPatrol: WildBody; - wild_body_bomber: WildBody; - wild_top_yellowcoat: WildBody; +export interface ISavageBody { + wild_body: IWildBody; + wild_body_1: IWildBody; + wild_body_2: IWildBody; + wild_body_3: IWildBody; + Wild_Dealmaker_body: IWildBody; + wild_security_body_1: IWildBody; + wild_security_body_2: IWildBody; + wild_Killa_body: IWildBody; + wild_pmcBot_body: IWildBody; + wild_Shturman_body: IWildBody; + wild_Gluhar_body: IWildBody; + Tshirt_security_TshirtTatu_01: IWildBody; + Tshirt_security_TshirtTatu_02: IWildBody; + Top_security_Husky: IWildBody; + Top_security_Gorka4: IWildBody; + scav_kit_upper_meteor: IWildBody; + wild_body_russia1: IWildBody; + Top_BOSS_Sanitar: IWildBody; + wild_body_motocross: IWildBody; + top_cultist_01: IWildBody; + top_cultist_02: IWildBody; + wild_body_rainparka: IWildBody; + wild_body_underarmour: IWildBody; + top_boss_tagilla: IWildBody; + DefaultUsecBody: IWildBody; + usec_upper_acu: IWildBody; + usec_upper_commando: IWildBody; + usec_upper_aggressor: IWildBody; + usec_upper_hoody: IWildBody; + usec_upper_pcuironsight: IWildBody; + usec_top_beltstaff: IWildBody; + usec_upper_flexion: IWildBody; + usec_upper_tier3: IWildBody; + usec_upper_pcsmulticam: IWildBody; + usec_upper_tier_2: IWildBody; + usec_upper_infiltrator: IWildBody; + user_upper_NightPatrol: IWildBody; + wild_body_bomber: IWildBody; + wild_top_yellowcoat: IWildBody; } -export interface WildBody { +export interface IWildBody { body: string; hands: string; isNotRandom: boolean; } -export interface SavageFeet { - wild_feet: WildFeet; - wild_feet_1: WildFeet; - wild_feet_2: WildFeet; - Wild_Dealmaker_feet: WildFeet; - wild_security_feet_1: WildFeet; - Wild_Killa_feet: WildFeet; - wild_pmcBot_feet: WildFeet; - Pants_BOSS_Glukhar: WildFeet; - Pants_BOSS_Shturman: WildFeet; - Pants_security_Gorka4: WildFeet; - Pants_security_Flora: WildFeet; - scav_kit_lower_sklon: WildFeet; - Pants_BOSS_Sanitar: WildFeet; - wild_feet_sweatpants: WildFeet; - wild_feet_wasatch: WildFeet; - wild_feet_slimPants: WildFeet; - pants_cultist_01: WildFeet; - pants_cultist_02: WildFeet; - wild_feet_scavelite_taclite: WildFeet; - pants_boss_tagilla: WildFeet; - wild_feet_bomber: WildFeet; - wild_pants_yellowcoat: WildFeet; +export interface ISavageFeet { + wild_feet: IWildFeet; + wild_feet_1: IWildFeet; + wild_feet_2: IWildFeet; + Wild_Dealmaker_feet: IWildFeet; + wild_security_feet_1: IWildFeet; + Wild_Killa_feet: IWildFeet; + wild_pmcBot_feet: IWildFeet; + Pants_BOSS_Glukhar: IWildFeet; + Pants_BOSS_Shturman: IWildFeet; + Pants_security_Gorka4: IWildFeet; + Pants_security_Flora: IWildFeet; + scav_kit_lower_sklon: IWildFeet; + Pants_BOSS_Sanitar: IWildFeet; + wild_feet_sweatpants: IWildFeet; + wild_feet_wasatch: IWildFeet; + wild_feet_slimPants: IWildFeet; + pants_cultist_01: IWildFeet; + pants_cultist_02: IWildFeet; + wild_feet_scavelite_taclite: IWildFeet; + pants_boss_tagilla: IWildFeet; + wild_feet_bomber: IWildFeet; + wild_pants_yellowcoat: IWildFeet; } -export interface WildFeet { +export interface IWildFeet { feet: string; isNotRandom: boolean; NotRandom: boolean; } -export interface CustomizationVoice { +export interface ICustomizationVoice { voice: string; side: string[]; isNotRandom: boolean; } -export interface BodyParts { +export interface IBodyParts { Head: string; Body: string; Feet: string; Hands: string; } -export interface ArmorMaterials { - UHMWPE: ArmorType; - Aramid: ArmorType; - Combined: ArmorType; - Titan: ArmorType; - Aluminium: ArmorType; - ArmoredSteel: ArmorType; - Ceramic: ArmorType; - Glass: ArmorType; +export interface IArmorMaterials { + UHMWPE: IArmorType; + Aramid: IArmorType; + Combined: IArmorType; + Titan: IArmorType; + Aluminium: IArmorType; + ArmoredSteel: IArmorType; + Ceramic: IArmorType; + Glass: IArmorType; } -export interface ArmorType { +export interface IArmorType { Destructibility: number; MinRepairDegradation: number; MaxRepairDegradation: number; @@ -313,46 +315,46 @@ export interface ArmorType { MinRepairKitDegradation: number; MaxRepairKitDegradation: number; } -export interface Health { - Falling: Falling; - Effects: Effects; - HealPrice: HealPrice; - ProfileHealthSettings: ProfileHealthSettings; +export interface IHealth { + Falling: IFalling; + Effects: IEffects; + HealPrice: IHealPrice; + ProfileHealthSettings: IProfileHealthSettings; } -export interface Falling { +export interface IFalling { DamagePerMeter: number; SafeHeight: number; } -export interface Effects { - Existence: Existence; - Dehydration: Dehydration; - BreakPart: BreakPart; - Contusion: Contusion; - Disorientation: Disorientation; - Exhaustion: Exhaustion; - LowEdgeHealth: LowEdgeHealth; - RadExposure: RadExposure; - Stun: Stun; +export interface IEffects { + Existence: IExistence; + Dehydration: IDehydration; + BreakPart: IBreakPart; + Contusion: IContusion; + Disorientation: IDisorientation; + Exhaustion: IExhaustion; + LowEdgeHealth: ILowEdgeHealth; + RadExposure: IRadExposure; + Stun: IStun; Intoxication: Intoxication; - Regeneration: Regeneration; - Wound: Wound; - Berserk: Berserk; - Flash: Flash; - MedEffect: MedEffect; - Pain: Pain; - PainKiller: PainKiller; - SandingScreen: SandingScreen; + Regeneration: IRegeneration; + Wound: IWound; + Berserk: IBerserk; + Flash: IFlash; + MedEffect: IMedEffect; + Pain: IPain; + PainKiller: IPainKiller; + SandingScreen: ISandingScreen; MildMusclePain: IMusclePainEffect; SevereMusclePain: IMusclePainEffect; - Stimulator: Stimulator; - Tremor: Tremor; - ChronicStaminaFatigue: ChronicStaminaFatigue; - Fracture: Fracture2; - HeavyBleeding: HeavyBleeding2; - LightBleeding: LightBleeding2; - BodyTemperature: BodyTemperature; + Stimulator: IStimulator; + Tremor: ITremor; + ChronicStaminaFatigue: IChronicStaminaFatigue; + Fracture: IFracture; + HeavyBleeding: IHeavyBleeding; + LightBleeding: ILightBleeding; + BodyTemperature: IBodyTemperature; } -export interface Existence { +export interface IExistence { EnergyLoopTime: number; HydrationLoopTime: number; EnergyDamage: number; @@ -360,7 +362,7 @@ export interface Existence { DestroyedStomachEnergyTimeFactor: number; DestroyedStomachHydrationTimeFactor: number; } -export interface Dehydration { +export interface IDehydration { DefaultDelay: number; DefaultResidueTime: number; BleedingHealth: number; @@ -369,7 +371,7 @@ export interface Dehydration { DamageOnStrongDehydration: number; StrongDehydrationLoopTime: number; } -export interface BreakPart { +export interface IBreakPart { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -377,31 +379,31 @@ export interface BreakPart { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface Contusion { +export interface IContusion { Dummy: number; } -export interface Disorientation { +export interface IDisorientation { Dummy: number; } -export interface Exhaustion { +export interface IExhaustion { DefaultDelay: number; DefaultResidueTime: number; Damage: number; DamageLoopTime: number; } -export interface LowEdgeHealth { +export interface ILowEdgeHealth { DefaultDelay: number; DefaultResidueTime: number; StartCommonHealth: number; } -export interface RadExposure { +export interface IRadExposure { Damage: number; DamageLoopTime: number; } -export interface Stun { +export interface IStun { Dummy: number; } export interface Intoxication { @@ -415,52 +417,52 @@ export interface Intoxication { HealExperience: number; RemovePrice: number; } -export interface Regeneration { +export interface IRegeneration { LoopTime: number; MinimumHealthPercentage: number; Energy: number; Hydration: number; - BodyHealth: BodyHealth; - Influences: Influences; + BodyHealth: IBodyHealth; + Influences: IInfluences; } -export interface BodyHealth { - Head: BodyHealthValue; - Chest: BodyHealthValue; - Stomach: BodyHealthValue; - LeftArm: BodyHealthValue; - RightArm: BodyHealthValue; - LeftLeg: BodyHealthValue; - RightLeg: BodyHealthValue; +export interface IBodyHealth { + Head: IBodyHealthValue; + Chest: IBodyHealthValue; + Stomach: IBodyHealthValue; + LeftArm: IBodyHealthValue; + RightArm: IBodyHealthValue; + LeftLeg: IBodyHealthValue; + RightLeg: IBodyHealthValue; } -export interface BodyHealthValue { +export interface IBodyHealthValue { Value: number; } -export interface Influences { - LightBleeding: Influence; - HeavyBleeding: Influence; - Fracture: Influence; - RadExposure: Influence; - Intoxication: Influence; +export interface IInfluences { + LightBleeding: IInfluence; + HeavyBleeding: IInfluence; + Fracture: IInfluence; + RadExposure: IInfluence; + Intoxication: IInfluence; } -export interface Influence { +export interface IInfluence { HealthSlowDownPercentage: number; EnergySlowDownPercentage: number; HydrationSlowDownPercentage: number; } -export interface Wound { +export interface IWound { WorkingTime: number; ThresholdMin: number; ThresholdMax: number; } -export interface Berserk { +export interface IBerserk { DefaultDelay: number; WorkingTime: number; DefaultResidueTime: number; } -export interface Flash { +export interface IFlash { Dummy: number; } -export interface MedEffect { +export interface IMedEffect { LoopTime: number; StartDelay: number; DrinkStartDelay: number; @@ -470,14 +472,14 @@ export interface MedEffect { MedicalStartDelay: number; StimulatorStartDelay: number; } -export interface Pain { +export interface IPain { TremorDelay: number; HealExperience: number; } -export interface PainKiller { +export interface IPainKiller { Dummy: number; } -export interface SandingScreen { +export interface ISandingScreen { Dummy: number; } export interface IMusclePainEffect { @@ -486,54 +488,54 @@ export interface IMusclePainEffect { OfflineDurationMin: number; TraumaChance: number; } -export interface Stimulator { +export interface IStimulator { BuffLoopTime: number; - Buffs: Buffs; + Buffs: IBuffs; } -export interface Buffs { - BuffsSJ1TGLabs: Buff[]; - BuffsSJ6TGLabs: Buff[]; - BuffsPropital: Buff[]; - BuffsZagustin: Buff[]; - BuffseTGchange: Buff[]; - BuffsAdrenaline: Buff[]; - BuffsGoldenStarBalm: Buff[]; - Buffs_drink_aquamari: Buff[]; - Buffs_drink_maxenergy: Buff[]; - Buffs_drink_milk: Buff[]; - Buffs_drink_tarcola: Buff[]; - Buffs_drink_hotrod: Buff[]; - Buffs_drink_juice_army: Buff[]; - Buffs_drink_water: Buff[]; - Buffs_food_borodinskiye: Buff[]; - Buffs_food_condensed_milk: Buff[]; - Buffs_food_emelya: Buff[]; - Buffs_food_mayonez: Buff[]; - Buffs_food_mre: Buff[]; - Buffs_food_sugar: Buff[]; - Buffs_drink_vodka: Buff[]; - Buffs_drink_jack: Buff[]; - Buffs_drink_moonshine: Buff[]; - Buffs_drink_purewater: Buff[]; - Buffs_3bTG: Buff[]; - Buffs_AHF1M: Buff[]; - Buffs_L1: Buff[]; - Buffs_MULE: Buff[]; - Buffs_Meldonin: Buff[]; - Buffs_Obdolbos: Buff[]; - Buffs_P22: Buff[]; - Buffs_KultistsToxin: Buff[]; - Buffs_BodyTemperature: Buff[]; - Buffs_Antidote: Buff[]; - Buffs_melee_bleed: Buff[]; - Buffs_melee_blunt: Buff[]; - Buffs_hultafors: Buff[]; - Buffs_drink_vodka_BAD: Buff[]; - Buffs_food_alyonka: Buff[]; - Buffs_food_slippers: Buff[]; - Buffs_knife: Buff[]; +export interface IBuffs { + BuffsSJ1TGLabs: IBuff[]; + BuffsSJ6TGLabs: IBuff[]; + BuffsPropital: IBuff[]; + BuffsZagustin: IBuff[]; + BuffseTGchange: IBuff[]; + BuffsAdrenaline: IBuff[]; + BuffsGoldenStarBalm: IBuff[]; + Buffs_drink_aquamari: IBuff[]; + Buffs_drink_maxenergy: IBuff[]; + Buffs_drink_milk: IBuff[]; + Buffs_drink_tarcola: IBuff[]; + Buffs_drink_hotrod: IBuff[]; + Buffs_drink_juice_army: IBuff[]; + Buffs_drink_water: IBuff[]; + Buffs_food_borodinskiye: IBuff[]; + Buffs_food_condensed_milk: IBuff[]; + Buffs_food_emelya: IBuff[]; + Buffs_food_mayonez: IBuff[]; + Buffs_food_mre: IBuff[]; + Buffs_food_sugar: IBuff[]; + Buffs_drink_vodka: IBuff[]; + Buffs_drink_jack: IBuff[]; + Buffs_drink_moonshine: IBuff[]; + Buffs_drink_purewater: IBuff[]; + Buffs_3bTG: IBuff[]; + Buffs_AHF1M: IBuff[]; + Buffs_L1: IBuff[]; + Buffs_MULE: IBuff[]; + Buffs_Meldonin: IBuff[]; + Buffs_Obdolbos: IBuff[]; + Buffs_P22: IBuff[]; + Buffs_KultistsToxin: IBuff[]; + Buffs_BodyTemperature: IBuff[]; + Buffs_Antidote: IBuff[]; + Buffs_melee_bleed: IBuff[]; + Buffs_melee_blunt: IBuff[]; + Buffs_hultafors: IBuff[]; + Buffs_drink_vodka_BAD: IBuff[]; + Buffs_food_alyonka: IBuff[]; + Buffs_food_slippers: IBuff[]; + Buffs_knife: IBuff[]; } -export interface Buff { +export interface IBuff { BuffType: string; Chance: number; Delay: number; @@ -542,17 +544,17 @@ export interface Buff { AbsoluteValue: boolean; SkillName: string; } -export interface Tremor { +export interface ITremor { DefaultDelay: number; DefaultResidueTime: number; } -export interface ChronicStaminaFatigue { +export interface IChronicStaminaFatigue { EnergyRate: number; WorkingTime: number; TicksEvery: number; EnergyRatePerStack: number; } -export interface Fracture2 { +export interface IFracture { DefaultDelay: number; DefaultResidueTime: number; HealExperience: number; @@ -560,10 +562,10 @@ export interface Fracture2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - BulletHitProbability: Probability; - FallingProbability: Probability; + BulletHitProbability: IProbability; + FallingProbability: IProbability; } -export interface HeavyBleeding2 { +export interface IHeavyBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -579,15 +581,15 @@ export interface HeavyBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface Probability { +export interface IProbability { FunctionType: string; K: number; B: number; Threshold: number; } -export interface LightBleeding2 { +export interface ILightBleeding { DefaultDelay: number; DefaultResidueTime: number; DamageEnergy: number; @@ -603,78 +605,78 @@ export interface LightBleeding2 { OfflineDurationMax: number; RemovePrice: number; RemovedAfterDeath: boolean; - Probability: Probability; + Probability: IProbability; } -export interface BodyTemperature { +export interface IBodyTemperature { DefaultBuildUpTime: number; DefaultResidueTime: number; LoopTime: number; } -export interface HealPrice { +export interface IHealPrice { HealthPointPrice: number; HydrationPointPrice: number; EnergyPointPrice: number; TrialLevels: number; TrialRaids: number; } -export interface ProfileHealthSettings { - BodyPartsSettings: BodyPartsSettings; - HealthFactorsSettings: HealthFactorsSettings; +export interface IProfileHealthSettings { + BodyPartsSettings: IBodyPartsSettings; + HealthFactorsSettings: IHealthFactorsSettings; DefaultStimulatorBuff: string; } -export interface BodyPartsSettings { - Head: BodyPartsSetting; - Chest: BodyPartsSetting; - Stomach: BodyPartsSetting; - LeftArm: BodyPartsSetting; - RightArm: BodyPartsSetting; - LeftLeg: BodyPartsSetting; - RightLeg: BodyPartsSetting; +export interface IBodyPartsSettings { + Head: IBodyPartsSetting; + Chest: IBodyPartsSetting; + Stomach: IBodyPartsSetting; + LeftArm: IBodyPartsSetting; + RightArm: IBodyPartsSetting; + LeftLeg: IBodyPartsSetting; + RightLeg: IBodyPartsSetting; } -export interface BodyPartsSetting { +export interface IBodyPartsSetting { Minimum: number; Maximum: number; Default: number; OverDamageReceivedMultiplier: number; } -export interface HealthFactorsSettings { - Energy: HealthFactorSetting; - Hydration: HealthFactorSetting; - Temperature: HealthFactorSetting; - Poisoning: HealthFactorSetting; - Radiation: HealthFactorSetting; +export interface IHealthFactorsSettings { + Energy: IHealthFactorSetting; + Hydration: IHealthFactorSetting; + Temperature: IHealthFactorSetting; + Poisoning: IHealthFactorSetting; + Radiation: IHealthFactorSetting; } -export interface HealthFactorSetting { +export interface IHealthFactorSetting { Minimum: number; Maximum: number; Default: number; } -export interface Rating { +export interface IRating { levelRequired: number; limit: number; - categories: Categories; + categories: ICategories; } -export interface Categories { +export interface ICategories { experience: boolean; kd: boolean; surviveRatio: boolean; avgEarnings: boolean; - kills: boolean; + pmcKills: boolean; raidCount: boolean; longestShot: boolean; timeOnline: boolean; inventoryFullCost: boolean; ragFairStanding: boolean; } -export interface Tournament { - categories: Categories2; +export interface ITournament { + categories: ITournamentCategories; limit: number; levelRequired: number; } -export interface Categories2 { +export interface ITournamentCategories { dogtags: boolean; } -export interface RagFair { +export interface IRagFair { enabled: boolean; priceStabilizerEnabled: boolean; includePveTraderSales: boolean; @@ -689,7 +691,7 @@ export interface RagFair { priorityTimeModifier: number; maxRenewOfferTimeInHour: number; renewPricePerHour: number; - maxActiveOfferCount: MaxActiveOfferCount[]; + maxActiveOfferCount: IMaxActiveOfferCount[]; balancerRemovePriceCoefficient: number; balancerMinPriceCount: number; balancerAveragePriceCoefficient: number; @@ -701,7 +703,7 @@ export interface RagFair { ratingDecreaseCount: number; maxSumForIncreaseRatingPerOneSale: number; maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: MaxSumForRarity; + maxSumForRarity: IMaxSumForRarity; ChangePriceCoef: number; balancerUserItemSaleCooldownEnabled: boolean; balancerUserItemSaleCooldown: number; @@ -710,24 +712,24 @@ export interface RagFair { isOnlyFoundInRaidAllowed: boolean; sellInOnePiece: number; } -export interface MaxActiveOfferCount { +export interface IMaxActiveOfferCount { from: number; to: number; count: number; } -export interface MaxSumForRarity { - Common: RarityMaxSum; - Rare: RarityMaxSum; - Superrare: RarityMaxSum; - Not_exist: RarityMaxSum; +export interface IMaxSumForRarity { + Common: IRarityMaxSum; + Rare: IRarityMaxSum; + Superrare: IRarityMaxSum; + Not_exist: IRarityMaxSum; } -export interface RarityMaxSum { +export interface IRarityMaxSum { value: number; } -export interface Handbook { +export interface IHandbook { defaultCategory: string; } -export interface Stamina { +export interface IStamina { Capacity: number; SprintDrainRate: number; BaseRestorationRate: number; @@ -738,27 +740,27 @@ export interface Stamina { AimRangeFinderDrainRate: number; OxygenCapacity: number; OxygenRestoration: number; - WalkOverweightLimits: xyz; - BaseOverweightLimits: xyz; - SprintOverweightLimits: xyz; - WalkSpeedOverweightLimits: xyz; - CrouchConsumption: xyz; - WalkConsumption: xyz; - StandupConsumption: xyz; - TransitionSpeed: xyz; + WalkOverweightLimits: Ixyz; + BaseOverweightLimits: Ixyz; + SprintOverweightLimits: Ixyz; + WalkSpeedOverweightLimits: Ixyz; + CrouchConsumption: Ixyz; + WalkConsumption: Ixyz; + StandupConsumption: Ixyz; + TransitionSpeed: Ixyz; SprintAccelerationLowerLimit: number; SprintSpeedLowerLimit: number; SprintSensitivityLowerLimit: number; - AimConsumptionByPose: xyz; - RestorationMultiplierByPose: xyz; - OverweightConsumptionByPose: xyz; + AimConsumptionByPose: Ixyz; + RestorationMultiplierByPose: Ixyz; + OverweightConsumptionByPose: Ixyz; AimingSpeedMultiplier: number; WalkVisualEffectMultiplier: number; HandsCapacity: number; HandsRestoration: number; ProneConsumption: number; BaseHoldBreathConsumption: number; - SoundRadius: xyz; + SoundRadius: Ixyz; ExhaustedMeleeSpeed: number; FatigueRestorationRate: number; FatigueAmountToCreateEffect: number; @@ -769,12 +771,12 @@ export interface Stamina { StaminaExhaustionCausesJiggle: boolean; StaminaExhaustionStartsBreathSound: boolean; StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: xyz; - PoseLevelIncreaseSpeed: xyz; - PoseLevelDecreaseSpeed: xyz; - PoseLevelConsumptionPerNotch: xyz; + HoldBreathStaminaMultiplier: Ixyz; + PoseLevelIncreaseSpeed: Ixyz; + PoseLevelDecreaseSpeed: Ixyz; + PoseLevelConsumptionPerNotch: Ixyz; } -export interface StaminaRestoration { +export interface IStaminaRestoration { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -782,7 +784,7 @@ export interface StaminaRestoration { RightLimit: number; ZeroValue: number; } -export interface StaminaDrain { +export interface IStaminaDrain { LowerLeftPoint: number; LowerRightPoint: number; LeftPlatoPoint: number; @@ -790,17 +792,17 @@ export interface StaminaDrain { RightLimit: number; ZeroValue: number; } -export interface RequirementReferences { - Alpinist: Alpinist[]; +export interface IRequirementReferences { + Alpinist: IAlpinist[]; } -export interface Alpinist { +export interface IAlpinist { Requirement: string; Id: string; Count: number; RequiredSlot: string; RequirementTip: string; } -export interface RestrictionsInRaid { +export interface IRestrictionsInRaid { TemplateId: string; Value: number; } @@ -809,36 +811,36 @@ export interface ISquadSettings { SecondsForExpiredRequest: number; SendRequestDelaySeconds: number; } -export interface Insurance { +export interface IInsurance { MaxStorageTimeInHour: number; } -export interface SkillsSettings { +export interface ISkillsSettings { SkillProgressRate: number; WeaponSkillProgressRate: number; WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: HideoutManagement; - Crafting: Crafting; - Metabolism: Metabolism; + HideoutManagement: IHideoutManagement; + Crafting: ICrafting; + Metabolism: IMetabolism; Immunity: Immunity; - Endurance: Endurance; - Strength: Strength; - Vitality: Vitality; - Health: Health2; - StressResistance: StressResistance; - Throwing: Throwing; - RecoilControl: RecoilControl; - Pistol: WeaponSkills; - Revolver: WeaponSkills; + Endurance: IEndurance; + Strength: IStrength; + Vitality: IVitality; + Health: IHealthSkillProgress; + StressResistance: IStressResistance; + Throwing: IThrowing; + RecoilControl: IRecoilControl; + Pistol: IWeaponSkills; + Revolver: IWeaponSkills; SMG: any[]; - Assault: WeaponSkills; - Shotgun: WeaponSkills; - Sniper: WeaponSkills; + Assault: IWeaponSkills; + Shotgun: IWeaponSkills; + Sniper: IWeaponSkills; LMG: any[]; HMG: any[]; Launcher: any[]; AttachedLauncher: any[]; Melee: IMeleeSkill; - DMR: WeaponSkills; + DMR: IWeaponSkills; BearAssaultoperations: any[]; BearAuthority: any[]; BearAksystems: any[]; @@ -850,41 +852,41 @@ export interface SkillsSettings { UsecNegotiations: any[]; UsecTactics: any[]; BotReload: any[]; - CovertMovement: CovertMovement; + CovertMovement: ICovertMovement; FieldMedicine: any[]; - Search: Search; + Search: ISearch; Sniping: any[]; ProneMovement: any[]; FirstAid: any[]; - LightVests: ArmorSkills; - HeavyVests: ArmorSkills; + LightVests: IArmorSkills; + HeavyVests: IArmorSkills; WeaponModding: any[]; AdvancedModding: any[]; NightOps: any[]; SilentOps: any[]; Lockpicking: any[]; - WeaponTreatment: WeaponTreatment; - MagDrills: MagDrills; + WeaponTreatment: IWeaponTreatment; + MagDrills: IMagDrills; Freetrading: any[]; Auctions: any[]; Cleanoperations: any[]; Barter: any[]; Shadowconnections: any[]; Taskperformance: any[]; - Perception: Perception; + Perception: IPerception; Intellect: Intellect; - Attention: Attention; - Charisma: Charisma; - Memory: Memory; - Surgery: Surgery; - AimDrills: AimDrills; + Attention: IAttention; + Charisma: ICharisma; + Memory: IMemory; + Surgery: ISurgery; + AimDrills: IAimDrills; BotSound: any[]; - TroubleShooting: TroubleShooting; + TroubleShooting: ITroubleShooting; } export interface IMeleeSkill { BuffSettings: IBuffSettings; } -export interface ArmorSkills { +export interface IArmorSkills { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IArmorCounters; @@ -900,35 +902,35 @@ export interface ArmorSkills { export interface IArmorCounters { armorDurability: ISkillCounter; } -export interface HideoutManagement { +export interface IHideoutManagement { SkillPointsPerAreaUpgrade: number; SkillPointsPerCraft: number; ConsumptionReductionPerLevel: number; SkillBoostPercent: number; - SkillPointsRate: SkillPointsRate; - EliteSlots: EliteSlots; + SkillPointsRate: ISkillPointsRate; + EliteSlots: IEliteSlots; } -export interface SkillPointsRate { - Generator: Generator; - AirFilteringUnit: SkillPointRate; - WaterCollector: SkillPointRate; - SolarPower: SkillPointRate; +export interface ISkillPointsRate { + Generator: ISkillPointRate; + AirFilteringUnit: ISkillPointRate; + WaterCollector: ISkillPointRate; + SolarPower: ISkillPointRate; } -export interface SkillPointRate { +export interface ISkillPointRate { ResourceSpent: number; PointsGained: number; } -export interface EliteSlots { - Generator: EliteSlot; - AirFilteringUnit: EliteSlot; - WaterCollector: EliteSlot; - BitcoinFarm: EliteSlot; +export interface IEliteSlots { + Generator: IEliteSlot; + AirFilteringUnit: IEliteSlot; + WaterCollector: IEliteSlot; + BitcoinFarm: IEliteSlot; } -export interface EliteSlot { +export interface IEliteSlot { Slots: number; Container: number; } -export interface Crafting { +export interface ICrafting { PointsPerCraftingCycle: number; CraftingCycleHours: number; PointsPerUniqueCraftCycle: number; @@ -938,7 +940,7 @@ export interface Crafting { EliteExtraProductions: number; CraftingPointsToInteligence: number; } -export interface Metabolism { +export interface IMetabolism { HydrationRecoveryRate: number; EnergyRecoveryRate: number; IncreasePositiveEffectDurationRate: number; @@ -952,14 +954,14 @@ export interface Immunity { HealthNegativeEffect: number; StimulatorNegativeBuff: number; } -export interface Endurance { +export interface IEndurance { MovementAction: number; SprintAction: number; GainPerFatigueStack: number; DependentSkillRatios: IDependentSkillRatio[]; QTELevelMultipliers: Record>; } -export interface Strength { +export interface IStrength { DependentSkillRatios: IDependentSkillRatio[]; SprintActionMin: number; SprintActionMax: number; @@ -979,38 +981,38 @@ export interface IQTELevelMultiplier { Level: number; Multiplier: number; } -export interface Vitality { +export interface IVitality { DamageTakenAction: number; HealthNegativeEffect: number; } -export interface Health2 { +export interface IHealthSkillProgress { SkillProgress: number; } -export interface StressResistance { +export interface IStressResistance { HealthNegativeEffect: number; LowHPDuration: number; } -export interface Throwing { +export interface IThrowing { ThrowAction: number; } -export interface RecoilControl { +export interface IRecoilControl { RecoilAction: number; RecoilBonusPerLevel: number; } -export interface WeaponSkills { +export interface IWeaponSkills { WeaponReloadAction: number; WeaponShotAction: number; WeaponFixAction: number; WeaponChamberAction: number; } -export interface CovertMovement { +export interface ICovertMovement { MovementAction: number; } -export interface Search { +export interface ISearch { SearchAction: number; FindAction: number; } -export interface WeaponTreatment { +export interface IWeaponTreatment { BuffMaxCount: number; BuffSettings: IBuffSettings; Counters: IWeaponTreatmentCounters; @@ -1031,12 +1033,12 @@ export interface IBuffSettings { RareBuffChanceCoff: number; ReceivedDurabilityMaxPercent: number; } -export interface MagDrills { +export interface IMagDrills { RaidLoadedAmmoAction: number; RaidUnloadedAmmoAction: number; MagazineCheckAction: number; } -export interface Perception { +export interface IPerception { DependentSkillRatios: ISkillRatio[]; OnlineAction: number; UniqueLoot: number; @@ -1063,13 +1065,13 @@ export interface ISkillCounter { divisor: number; points: number; } -export interface Attention { +export interface IAttention { DependentSkillRatios: ISkillRatio[]; ExamineWithInstruction: number; FindActionFalse: number; FindActionTrue: number; } -export interface Charisma { +export interface ICharisma { BonusSettings: IBonusSettings; Counters: ICharismaSkillCounters; SkillProgressInt: number; @@ -1100,26 +1102,26 @@ export interface ILevelBonusSettings { PaidExitDiscount: number; RepeatableQuestChangeDiscount: number; } -export interface Memory { +export interface IMemory { AnySkillUp: number; SkillProgress: number; } -export interface Surgery { +export interface ISurgery { SurgeryAction: number; SkillProgress: number; } -export interface AimDrills { +export interface IAimDrills { WeaponShotAction: number; } -export interface TroubleShooting { +export interface ITroubleShooting { MalfRepairSpeedBonusPerLevel: number; SkillPointsPerMalfFix: number; EliteDurabilityChanceReduceMult: number; EliteAmmoChanceReduceMult: number; EliteMagChanceReduceMult: number; } -export interface Aiming { - ProceduralIntensityByPose: xyz; +export interface IAiming { + ProceduralIntensityByPose: Ixyz; AimProceduralIntensity: number; HeavyWeight: number; LightWeight: number; @@ -1130,16 +1132,16 @@ export interface Aiming { RecoilScaling: number; RecoilDamping: number; CameraSnapGlobalMult: number; - RecoilXIntensityByPose: xyz; - RecoilYIntensityByPose: xyz; - RecoilZIntensityByPose: xyz; + RecoilXIntensityByPose: Ixyz; + RecoilYIntensityByPose: Ixyz; + RecoilZIntensityByPose: Ixyz; RecoilCrank: boolean; RecoilHandDamping: number; RecoilConvergenceMult: number; RecoilVertBonus: number; RecoilBackBonus: number; } -export interface Malfunction { +export interface IMalfunction { AmmoMalfChanceMult: number; MagazineMalfChanceMult: number; MalfRepairHardSlideMult: number; @@ -1150,7 +1152,7 @@ export interface Malfunction { OutToIdleSpeedMultForPistol: number; IdleToOutSpeedMultOnMalf: number; TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: xyz; + DurRangeToIgnoreMalfs: Ixyz; DurFeedWt: number; DurMisfireWt: number; DurJamWt: number; @@ -1166,7 +1168,7 @@ export interface Malfunction { OverheatHardSlideMinWt: number; OverheatHardSlideMaxWt: number; } -export interface Overheat { +export interface IOverheat { MinOverheat: number; MaxOverheat: number; OverheatProblemsStart: number; @@ -1196,12 +1198,12 @@ export interface Overheat { AutoshotPossibilityDuration: number; MaxOverheatCoolCoef: number; } -export interface FenceSettings { +export interface IFenceSettings { FenceId: string; - Levels: Record; + Levels: Record; paidExitStandingNumerator: number; } -export interface FenceLevel { +export interface IFenceLevel { SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1214,55 +1216,50 @@ export interface FenceLevel { ExfiltrationPriceModifier: number; AvailableExits: number; } -export interface Inertia { - InertiaLimits: xyz; +export interface IInertia { + InertiaLimits: Ixyz; InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: xyz; - WalkInertia: xyz; + ExitMovementStateSpeedThreshold: Ixyz; + WalkInertia: Ixyz; FallThreshold: number; - SpeedLimitAfterFallMin: xyz; - SpeedLimitAfterFallMax: xyz; - SpeedLimitDurationMin: xyz; - SpeedLimitDurationMax: xyz; - SpeedInertiaAfterJump: xyz; + SpeedLimitAfterFallMin: Ixyz; + SpeedLimitAfterFallMax: Ixyz; + SpeedLimitDurationMin: Ixyz; + SpeedLimitDurationMax: Ixyz; + SpeedInertiaAfterJump: Ixyz; BaseJumpPenaltyDuration: number; DurationPower: number; BaseJumpPenalty: number; PenaltyPower: number; - InertiaTiltCurveMin: xyz; - InertiaTiltCurveMax: xyz; - InertiaBackwardCoef: xyz; - TiltInertiaMaxSpeed: xyz; - TiltStartSideBackSpeed: xyz; - TiltMaxSideBackSpeed: xyz; - TiltAcceleration: xyz; + InertiaTiltCurveMin: Ixyz; + InertiaTiltCurveMax: Ixyz; + InertiaBackwardCoef: Ixyz; + TiltInertiaMaxSpeed: Ixyz; + TiltStartSideBackSpeed: Ixyz; + TiltMaxSideBackSpeed: Ixyz; + TiltAcceleration: Ixyz; AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: xyz; - SprintSpeedInertiaCurveMax: xyz; - SprintBrakeInertia: xyz; - SprintTransitionMotionPreservation: xyz; - WeaponFlipSpeed: xyz; - PreSprintAccelerationLimits: xyz; - SprintAccelerationLimits: xyz; - SideTime: xyz; - DiagonalTime: xyz; - MaxTimeWithoutInput: xyz; + SprintSpeedInertiaCurveMin: Ixyz; + SprintSpeedInertiaCurveMax: Ixyz; + SprintBrakeInertia: Ixyz; + SprintTransitionMotionPreservation: Ixyz; + WeaponFlipSpeed: Ixyz; + PreSprintAccelerationLimits: Ixyz; + SprintAccelerationLimits: Ixyz; + SideTime: Ixyz; + DiagonalTime: Ixyz; + MaxTimeWithoutInput: Ixyz; MinDirectionBlendTime: number; - MoveTimeRange: xyz; - ProneDirectionAccelerationRange: xyz; - ProneSpeedAccelerationRange: xyz; - MinMovementAccelerationRangeRight: xyz; - MaxMovementAccelerationRangeRight: xyz; + MoveTimeRange: Ixyz; + ProneDirectionAccelerationRange: Ixyz; + ProneSpeedAccelerationRange: Ixyz; + MinMovementAccelerationRangeRight: Ixyz; + MaxMovementAccelerationRangeRight: Ixyz; } -export interface xyz { - x: number; - y: number; - z: number; -} -export interface Ballistic { +export interface IBallistic { GlobalDamageDegradationCoefficient: number; } -export interface RepairSettings { +export interface IRepairSettings { ItemEnhancementSettings: IItemEnhancementSettings; MinimumLevelToApplyBuff: number; RepairStrategies: IRepairStrategies; @@ -1286,7 +1283,7 @@ export interface IRepairStrategy { BuffTypes: string[]; Filter: string[]; } -export interface BotPreset { +export interface IBotPreset { UseThis: boolean; Role: string; BotDifficulty: string; @@ -1299,13 +1296,27 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } -export interface BotWeaponScattering { +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} +export interface IBotWeaponScattering { Name: string; PriorityScatter1meter: number; PriorityScatter10meter: number; PriorityScatter100meter: number; } -export interface Preset { +export interface IPreset { _id: string; _type: string; _changeWeaponName: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts index 54c70ba..f064225 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts @@ -1,3 +1,5 @@ +import { MinMax } from "../../../models/common/MinMax"; +import { Ixyz } from "./Ixyz"; export interface ILocationBase { AccessKeys: string[]; AirdropParameters: AirdropParameter[]; @@ -35,6 +37,7 @@ export interface ILocationBase { IsSecret: boolean; Locked: boolean; Loot: any[]; + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; MaxBotPerZone: number; MaxDistToFreePoint: number; MaxPlayers: number; @@ -49,6 +52,7 @@ export interface ILocationBase { OldSpawn: boolean; OpenZones: string; Preview: Preview; + PlayersRequestCount: number; RequiredPlayerLevel?: number; RequiredPlayerLevelMin?: number; RequiredPlayerLevelMax?: number; @@ -81,9 +85,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 +142,12 @@ 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 MinPlayerWaitTime { + minPlayers: number; + time: number; } export interface Preview { path: string; @@ -160,7 +164,7 @@ export interface SpawnPointParam { DelayToCanSpawnSec: number; Id: string; Infiltration: string; - Position: xyz; + Position: Ixyz; Rotation: number; Sides: string[]; } @@ -169,14 +173,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 +210,6 @@ export interface Wave { } export declare enum WildSpawnType { ASSAULT = "assault", - MARKSMAN = "marksman" + MARKSMAN = "marksman", + PMCBOT = "pmcbot" } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts index 572ec69..f8ea0c7 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILooseLoot.d.ts @@ -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; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/Ixyz.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/Ixyz.d.ts new file mode 100644 index 0000000..612dae1 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/common/Ixyz.d.ts @@ -0,0 +1,5 @@ +export interface Ixyz { + x: number; + y: number; + z: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts index 8bfeece..98f2398 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -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; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts index e4baac5..8b86d13 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; import { Item } from "./IItem"; export interface ILootBase { staticAmmo: Record; @@ -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 { diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts index 52968b1..c6005ca 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts @@ -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 { @@ -64,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..d8615fb 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts @@ -1,3 +1,4 @@ +import { Ixyz } from "../Ixyz"; export interface ITemplateItem { _id: string; _name: string; @@ -36,6 +37,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -200,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; @@ -246,7 +248,7 @@ export interface Props { FaceShieldComponent?: boolean; FaceShieldMask?: string; MaterialType?: string; - RicochetParams?: Xyz; + RicochetParams?: Ixyz; DeafStrength?: string; BlindnessProtection?: number; Distortion?: number; @@ -257,6 +259,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; @@ -281,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; @@ -351,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; @@ -425,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; diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts index 190ee69..87461aa 100644 --- a/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IAcceptFriendRequestData.d.ts @@ -1,3 +1,7 @@ -export interface IAcceptFriendRequestData { +export interface IAcceptFriendRequestData extends IBaseFriendRequest { +} +export interface ICancelFriendRequestData extends IBaseFriendRequest { +} +export interface IBaseFriendRequest { request_id: string; } diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetFriendListDataResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetFriendListDataResponse.d.ts index f8d700c..c558a41 100644 --- a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetFriendListDataResponse.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetFriendListDataResponse.d.ts @@ -1,16 +1,6 @@ -import { MemberCategory } from "../../enums/MemberCategory"; +import { IUserDialogInfo } from "../profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: Friend[]; + Friends: IUserDialogInfo[]; Ignore: string[]; InIgnoreList: string[]; } -export interface Friend { - _id: string; - Info: Info; -} -export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index 97f18b1..b469dee 100644 --- a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inRaid/ISaveProgressRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inRaid/ISaveProgressRequestData.d.ts index 6930261..0b6f091 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inRaid/ISaveProgressRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inRaid/ISaveProgressRequestData.d.ts @@ -1,7 +1,8 @@ +import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState"; import { IPmcData } from "../common/IPmcData"; import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData"; export interface ISaveProgressRequestData { - exit: string; + exit: PlayerRaidEndState; profile: IPmcData; isPlayerScav: boolean; health: ISyncHealthRequestData; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemTempObject.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemTempObject.d.ts index 62d4b64..12535ed 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemTempObject.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IAddItemTempObject.d.ts @@ -4,4 +4,5 @@ export interface IAddItemTempObject { count: number; isPreset: boolean; location?: Location; + containerId?: string; } diff --git a/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts b/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts index bdb021a..ce25dee 100644 --- a/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts @@ -7,8 +7,13 @@ export interface INotifierChannel { ws: string; } export interface INotification { - type: "RagfairOfferSold" | "new_message" | "ping"; + type: NotificationType; eventId: string; dialogId?: string; message?: Message; } +export declare enum NotificationType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + NEW_MESSAGE = "new_message", + PING = "ping" +} diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts index f24a788..d08da6e 100644 --- a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts @@ -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; @@ -61,7 +62,7 @@ export interface DialogueInfo { _id: string; type: MessageType; pinned: boolean; - Users?: any[]; + Users?: IUserDialogInfo[]; message: MessagePreview; } export interface Message { @@ -75,7 +76,7 @@ export interface Message { text?: string; hasRewards: boolean; rewardCollected: boolean; - items: MessageItems; + items?: MessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: any[]; @@ -115,6 +116,7 @@ export interface DateTime { export interface Aki { version: string; mods?: ModDetails[]; + receivedGifts: ReceivedGift[]; } export interface ModDetails { name: string; @@ -122,6 +124,10 @@ export interface ModDetails { author: string; dateAdded: number; } +export interface ReceivedGift { + giftId: string; + timestampAccepted: number; +} export interface Vitality { health: Health; effects: Effects; diff --git a/TypeScript/9RouterHooks/types/models/eft/ragfair/IGetItemPriceResult.d.ts b/TypeScript/9RouterHooks/types/models/eft/ragfair/IGetItemPriceResult.d.ts index 676322a..a38d434 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ragfair/IGetItemPriceResult.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ragfair/IGetItemPriceResult.d.ts @@ -1,5 +1,4 @@ -export interface IGetItemPriceResult { +import { MinMax } from "../../../models/common/MinMax"; +export interface IGetItemPriceResult extends MinMax { avg: number; - min: number; - max: number; } diff --git a/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts b/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts index 0551c56..cd7f5cd 100644 --- a/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/BaseClasses.d.ts @@ -34,6 +34,7 @@ export declare enum BaseClasses { MAP = "567849dd4bdc2d150f8b456e", MONEY = "543be5dd4bdc2deb348b4569", NIGHTVISION = "5a2c3a9486f774688b05e574", + THERMAL_VISION = "5d21f59b6dbe99052b54ef83", KEY = "543be5e94bdc2df1348b4568", KEY_MECHANICAL = "5c99f98d86f7745c314214b3", KEYCARD = "5c164d2286f774194c5e69fa", @@ -91,5 +92,10 @@ export declare enum BaseClasses { SILENCER = "550aa4cd4bdc2dd8348b456c", PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc", ITEM = "54009119af1c881c07000029", - CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25" + CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25", + AUXILARY_MOD = "5a74651486f7744e73386dd1", + BIPOD = "55818afb4bdc2dde698b456d", + HEADPHONES = "5645bcb74bdc2ded0b8b4578", + RANDOM_LOOT_CONTAINER = "62f109593b54472778797866", + STACKABLE_ITEM = "5661632d4bdc2d903d8b456b" } diff --git a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts index 2fe01c6..e01425c 100644 --- a/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/ConfigTypes.d.ts @@ -21,5 +21,6 @@ export declare enum ConfigTypes { TRADER = "aki-trader", WEATHER = "aki-weather", SEASONAL_EVENT = "aki-seasonalevents", - LOST_ON_DEATH = "aki-lostondeath" + LOST_ON_DEATH = "aki-lostondeath", + GIFTS = "aki-gifts" } diff --git a/TypeScript/9RouterHooks/types/models/enums/GiftSenderType.d.ts b/TypeScript/9RouterHooks/types/models/enums/GiftSenderType.d.ts new file mode 100644 index 0000000..fc695c8 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/GiftSenderType.d.ts @@ -0,0 +1,5 @@ +export declare enum GiftSenderType { + SYSTEM = "System", + TRADER = "Trader", + USER = "User" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/GiftSentResult.d.ts b/TypeScript/9RouterHooks/types/models/enums/GiftSentResult.d.ts new file mode 100644 index 0000000..08930c1 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/GiftSentResult.d.ts @@ -0,0 +1,6 @@ +export declare enum GiftSentResult { + FAILED_UNKNOWN = 1, + FAILED_GIFT_ALREADY_RECEIVED = 2, + FAILED_GIFT_DOESNT_EXIST = 3, + SUCCESS = 4 +} diff --git a/TypeScript/9RouterHooks/types/models/enums/ItemAddedResult.d.ts b/TypeScript/9RouterHooks/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/9RouterHooks/types/models/enums/PlayerRaidEndState.d.ts b/TypeScript/9RouterHooks/types/models/enums/PlayerRaidEndState.d.ts new file mode 100644 index 0000000..d792259 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/PlayerRaidEndState.d.ts @@ -0,0 +1,7 @@ +export declare enum PlayerRaidEndState { + SURVIVED = "survived", + LEFT = "left", + RUNNER = "runner", + MISSING_IN_ACTION = "missinginaction", + KILLED = "killed" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts b/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts index ff8c5f4..fee0ad2 100644 --- a/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts @@ -5,5 +5,8 @@ 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", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/9RouterHooks/types/models/enums/QuestTypeEnum.d.ts b/TypeScript/9RouterHooks/types/models/enums/QuestTypeEnum.d.ts new file mode 100644 index 0000000..6925ac2 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/QuestTypeEnum.d.ts @@ -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" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts b/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..d7cf037 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,7 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween", + NEW_YEARS = "NewYears", + PROMO = "Promo" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..921e797 100644 --- a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,9 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts b/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts index b4f4f8c..c65eff6 100644 --- a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/callbacks/IDataCallbacks.d.ts @@ -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; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..21bb32e 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts @@ -5,15 +5,26 @@ export interface IAirdropConfig extends IBaseConfig { kind: "aki-airdrop"; airdropChancePercent: AirdropChancePercent; airdropTypeWeightings: Record; + /** 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; + /** 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; } +/** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { bigmap: number; woods: number; @@ -23,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; + /** Items to limit stack size of key: item tpl value: min/max stack size */ itemStackLimits: Record; + /** Armor levels to allow inside crate e.g. [4,5,6] */ armorLevelWhitelist?: number[]; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts index 2e8716e..511b152 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts @@ -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; @@ -61,13 +62,20 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; pmc: number; } export interface EquipmentFilters { + /** Limits for mod types per weapon .e.g. scopes */ weaponModLimits: ModLimits; + /** Whitelsit for weapons allowed per gun */ weaponSightWhitelist: Record; faceShieldIsActiveChancePercent?: number; lightIsActiveDayChancePercent?: number; @@ -75,10 +83,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 +100,34 @@ export interface ModLimits { lightLaserLimit?: number; } export interface RandomisationDetails { + /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; + /** 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; - /** Modc chances */ + /** Mod chances */ mods?: Record; } 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; + /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } 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 { diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index c37f81f..d078225 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -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; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts new file mode 100644 index 0000000..37a132d --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/config/IGiftsConfig.d.ts @@ -0,0 +1,28 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { IUserDialogInfo } from "../../../models/eft/profile/IAkiProfile"; +import { GiftSenderType } from "../../../models/enums/GiftSenderType"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; +import { Traders } from "../../../models/enums/Traders"; +import { IBaseConfig } from "./IBaseConfig"; +export interface IGiftsConfig extends IBaseConfig { + kind: "aki-gifts"; + gifts: Record; +} +export interface Gift { + /** Items to send to player */ + items: Item[]; + /** Who is sending the gift to player */ + sender: GiftSenderType; + /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ + senderId?: string; + senderDetails: IUserDialogInfo; + /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ + trader?: Traders; + messageText: string; + /** Optional - if sending text from the client locale file */ + localeTextId?: string; + /** Optional - Used by Seasonal events to send on specific day */ + timestampToSend?: number; + associatedEvent: SeasonalEventType; + collectionTimeHours: number; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts index 3ae2972..c8fa57e 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts index fd498bc..9443cb7 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInsuranceConfig.d.ts @@ -1,10 +1,16 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { kind: "aki-insurance"; + /** Insurance price multiplier */ insuranceMultiplier: Record; + /** Chance item is returned as insurance, keyed by trader id */ returnChancePercent: Record; + /** 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; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts index b4af825..6657a1a 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts @@ -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; sealedAirdropContainer: ISealedAirdropContainerSettings; @@ -17,6 +18,7 @@ export interface RewardDetails { export interface ISealedAirdropContainerSettings { weaponRewardWeight: Record; defaultPresetsOnly: boolean; + /** Should contents be flagged as found in raid when opened */ foundInRaid: boolean; weaponModRewardLimits: Record; rewardTypeLimits: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts index bcd91cc..8d37f60 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILocationConfig.d.ts @@ -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; @@ -14,6 +19,14 @@ export interface ILocationConfig extends IBaseConfig { forcedLootSingleSpawnById: Record; /** 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; } export interface IFixEmptyBotWavesSettings { enabled: boolean; @@ -29,9 +42,14 @@ export interface ISplitWaveSettings { waveSizeThreshold: number; } export interface CustomWaves { + /** Bosses spawn on raid start */ boss: Record; normal: Record; } +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; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts index b557afe..3fb98fb 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ILostOnDeathConfig.d.ts @@ -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 { diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts index 87098da..a349ac2 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts @@ -1,25 +1,45 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; + /** 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>>; 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; + /** WildSpawnType bots PMCs should see as hostile */ enemyTypes: string[]; + /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts index 1eb640b..87e0173 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts @@ -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; @@ -73,6 +71,13 @@ export interface Dynamic { removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ blacklist: Blacklist; + /** Should prices over the multiplier be adjusted */ + unreasonableModPrices: IUnreasonableModPrices; +} +export interface IUnreasonableModPrices { + enabled: boolean; + handbookPriceOverMultiplier: number; + newPriceHandbookMultiplier: number; } export interface Barter { /** Should barter offers be generated */ @@ -100,13 +105,13 @@ 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 */ + damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ custom: string[]; /** BSG blacklist a large number of items from flea, true = use blacklist */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index 832f22a..be6ab91 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -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; } @@ -23,8 +24,12 @@ export interface FenceConfig { presetPriceMult: number; armorMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax; + /** Key: item tpl */ + itemStackSizeOverrideMinMax: Record; itemTypeLimits: Record; regenerateAssortsOnRefresh: boolean; + /** Block seasonal items from appearing when season is inactive */ + blacklistSeasonalItems: boolean; blacklist: string[]; } export interface DiscountOptions { diff --git a/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts new file mode 100644 index 0000000..2f09733 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -0,0 +1,30 @@ +import { Item } from "../../../models/eft/common/tables/IItem"; +import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "../../../models/eft/profile/IAkiProfile"; +import { MessageType } from "../../../models/enums/MessageType"; +import { Traders } from "../../../models/enums/Traders"; +export interface ISendMessageDetails { + /** Player id */ + recipientId: string; + /** Who is sending this message */ + sender: MessageType; + /** Optional - leave blank to use sender value */ + dialogType?: MessageType; + /** Optional - if sender is USER these details are used */ + senderDetails?: IUserDialogInfo; + /** Optional - the trader sending the message */ + trader?: Traders; + /** Optional - used in player/system messages, otherwise templateId is used */ + messageText?: string; + /** Optinal - Items to send to player */ + items?: Item[]; + /** Optional - How long items will be stored in mail before expiry */ + itemsMaxStorageLifetimeSeconds?: number; + /** Optional - Used when sending messages from traders who send text from locale json */ + templateId?: string; + /** Optional - ragfair related */ + systemData?: ISystemData; + /** Optional - Used by ragfair messages */ + ragfairDetails?: MessageContentRagfair; + /** Optional - Usage not known, unsure of purpose, even dumps dont have it */ + profileChangeEvents?: any[]; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts index f07382e..785e0a4 100644 --- a/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts @@ -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; } diff --git a/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts b/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts index d02861e..c72e18f 100644 --- a/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts @@ -24,7 +24,7 @@ export declare class AkiHttpListener implements IHttpListener { handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; - protected getBodyInfo(body: Buffer): any; + protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; } diff --git a/TypeScript/9RouterHooks/types/services/BotEquipmentModPoolService.d.ts b/TypeScript/9RouterHooks/types/services/BotEquipmentModPoolService.d.ts index adf59ff..b81ff01 100644 --- a/TypeScript/9RouterHooks/types/services/BotEquipmentModPoolService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotEquipmentModPoolService.d.ts @@ -6,19 +6,21 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { VFS } from "../utils/VFS"; +import { LocalisationService } from "./LocalisationService"; /** Store a mapping between weapons, their slots and the items that fit those slots */ export declare class BotEquipmentModPoolService { protected logger: ILogger; protected vfs: VFS; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected weaponModPool: Mods; protected gearModPool: Mods; protected weaponPoolGenerated: boolean; protected armorPoolGenerated: boolean; - constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Store dictionary of mods for each item passed in * @param items items to find related mods and store in modPool diff --git a/TypeScript/9RouterHooks/types/services/FenceService.d.ts b/TypeScript/9RouterHooks/types/services/FenceService.d.ts index 841a8ee..3f0e01b 100644 --- a/TypeScript/9RouterHooks/types/services/FenceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/FenceService.d.ts @@ -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"; @@ -139,6 +139,12 @@ export declare class FenceService { current: number; max: number; }>, loyaltyLevel: number): void; + /** + * Get stack size ofr a singular item (no mods) + * @param itemDbDetails item being added to fence + * @returns Stack size + */ + protected getSingleItemStackCount(itemDbDetails: ITemplateItem): number; /** * Add preset weapons to fence presets * @param assortCount how many assorts to add to assorts @@ -146,7 +152,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, assorts: ITraderAssort, loyaltyLevel: number): void; + protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record, assorts: ITraderAssort, loyaltyLevel: number): void; /** * Randomise items' upd properties e.g. med packs/weapons/armor * @param itemDetails Item being randomised @@ -176,7 +182,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 diff --git a/TypeScript/9RouterHooks/types/services/GiftService.d.ts b/TypeScript/9RouterHooks/types/services/GiftService.d.ts new file mode 100644 index 0000000..163635e --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/GiftService.d.ts @@ -0,0 +1,50 @@ +import { ProfileHelper } from "../helpers/ProfileHelper"; +import { GiftSentResult } from "../models/enums/GiftSentResult"; +import { MessageType } from "../models/enums/MessageType"; +import { Gift, IGiftsConfig } from "../models/spt/config/IGiftsConfig"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { ConfigServer } from "../servers/ConfigServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { MailSendService } from "./MailSendService"; +export declare class GiftService { + protected logger: ILogger; + protected mailSendService: MailSendService; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected profileHelper: ProfileHelper; + protected configServer: ConfigServer; + protected giftConfig: IGiftsConfig; + constructor(logger: ILogger, mailSendService: MailSendService, hashUtil: HashUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + /** + * Does a gift with a specific ID exist in db + * @param giftId Gift id to check for + * @returns True if it exists in db + */ + giftExists(giftId: string): boolean; + /** + * Send player a gift from a range of sources + * @param playerId Player to send gift to / sessionId + * @param giftId Id of gift in configs/gifts.json to send player + * @returns outcome of sending gift to player + */ + sendGiftToPlayer(playerId: string, giftId: string): GiftSentResult; + /** + * Get sender id based on gifts sender type enum + * @param giftData Gift to send player + * @returns trader/user/system id + */ + protected getSenderId(giftData: Gift): string; + /** + * Convert GiftSenderType into a dialog MessageType + * @param giftData Gift to send player + * @returns MessageType enum value + */ + protected getMessageType(giftData: Gift): MessageType; + /** + * Prapor sends gifts to player for first week after profile creation + * @param sessionId Player id + * @param day What day to give gift for + */ + sendPraporStartingGift(sessionId: string, day: number): void; +} diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 32fffba..1d30f6d 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -1,6 +1,7 @@ import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { DialogueHelper } from "../helpers/DialogueHelper"; import { HandbookHelper } from "../helpers/HandbookHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { TraderHelper } from "../helpers/TraderHelper"; @@ -22,6 +23,7 @@ export declare class InsuranceService { protected databaseServer: DatabaseServer; protected secureContainerHelper: SecureContainerHelper; protected randomUtil: RandomUtil; + protected itemHelper: ItemHelper; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -33,23 +35,25 @@ export declare class InsuranceService { protected configServer: ConfigServer; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer); insuranceExists(sessionId: string): boolean; - insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Get all insured items by all traders for a profile + * @param sessionId Profile id (session id) + * @returns Item array + */ getInsurance(sessionId: string): Record; + /** + * Get insured items by profile id + trader id + * @param sessionId Profile id (session id) + * @param traderId Trader items were insured with + * @returns Item array + */ getInsuranceItems(sessionId: string, traderId: string): Item[]; resetInsurance(sessionId: string): void; - resetInsuranceTraderArray(sessionId: string, traderId: string): void; - addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: any): void; - /** - * Get the rouble price for an item by templateId - * @param itemTpl item tpl to get handbook price for - * @returns handbook price in roubles, Return 0 if not found - */ - getItemPrice(itemTpl: string): number; /** * Sends stored insured items as message to player - * @param pmcData profile to modify + * @param pmcData profile to send insured items to * @param sessionID SessionId of current player * @param mapId Id of the map player died/exited that caused the insurance to be issued on */ @@ -59,11 +63,17 @@ export declare class InsuranceService { * @param sessionID Session id */ sendLostInsuranceMessage(sessionID: string): void; + /** + * Check all root insured items and remove location property + set slotId to 'hideout' + * @param sessionId Session id + * @param traderId Trader id + */ protected removeLocationProperty(sessionId: string, traderId: string): void; /** - * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure + * Get a timestamp of when insurance items should be sent to player based on trader used to insure + * Apply insurance return bonus if found in profile * @param pmcData Player profile - * @param trader Trader used to insure items + * @param trader Trader base used to insure items * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; @@ -90,5 +100,32 @@ export declare class InsuranceService { * @param sessionID Session id */ protected addGearToSend(pmcData: IPmcData, insuredItem: InsuredItem, actualItem: Item, sessionID: string): void; + /** + * Does insurance exist for a player and by trader + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + * @returns True if exists + */ + protected insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; + /** + * Empty out array holding insured items by sessionid + traderid + * @param sessionId Player id (session id) + * @param traderId Trader items insured with + */ + resetInsuranceTraderArray(sessionId: string, traderId: string): void; + /** + * Store insured item + * @param sessionId Player id (session id) + * @param traderId Trader item insured with + * @param itemToAdd Insured item + */ + addInsuranceItemToArray(sessionId: string, traderId: string, itemToAdd: Item): void; + /** + * Get price of insurance * multiplier from config + * @param pmcData Player profile + * @param inventoryItem Item to be insured + * @param traderId Trader item is insured with + * @returns price in roubles + */ getPremium(pmcData: IPmcData, inventoryItem: Item, traderId: string): number; } diff --git a/TypeScript/9RouterHooks/types/services/MailSendService.d.ts b/TypeScript/9RouterHooks/types/services/MailSendService.d.ts new file mode 100644 index 0000000..70b8e44 --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/MailSendService.d.ts @@ -0,0 +1,111 @@ +import { ItemHelper } from "../helpers/ItemHelper"; +import { NotificationSendHelper } from "../helpers/NotificationSendHelper"; +import { NotifierHelper } from "../helpers/NotifierHelper"; +import { Item } from "../models/eft/common/tables/IItem"; +import { Dialogue, IUserDialogInfo, Message, MessageItems } from "../models/eft/profile/IAkiProfile"; +import { MessageType } from "../models/enums/MessageType"; +import { Traders } from "../models/enums/Traders"; +import { ISendMessageDetails } from "../models/spt/dialog/ISendMessageDetails"; +import { ILogger } from "../models/spt/utils/ILogger"; +import { DatabaseServer } from "../servers/DatabaseServer"; +import { SaveServer } from "../servers/SaveServer"; +import { HashUtil } from "../utils/HashUtil"; +import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; +export declare class MailSendService { + protected logger: ILogger; + protected hashUtil: HashUtil; + protected timeUtil: TimeUtil; + protected saveServer: SaveServer; + protected databaseServer: DatabaseServer; + protected notifierHelper: NotifierHelper; + protected notificationSendHelper: NotificationSendHelper; + protected localisationService: LocalisationService; + protected itemHelper: ItemHelper; + protected readonly systemSenderId = "59e7125688a45068a6249071"; + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items using direct message text, do not look up any locale + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param message Text to send to the player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendDirectNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from an NPC (e.g. prapor) to the player with or without items + * @param playerId Players id to send message to + * @param sender The trader sending the message + * @param messageType What type the message will assume (e.g. QUEST_SUCCESS) + * @param messageLocaleId The localised text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendLocalisedNpcMessageToPlayer(playerId: string, sender: Traders, messageType: MessageType, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a message from SYSTEM to the player with or without items + * @param playerId Players id to send message to + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendSystemMessageToPlayer(playerId: string, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Send a USER message to a player with or without items + * @param playerId Players id to send message to + * @param senderId Who is sending the message + * @param message The text to send to player + * @param items Optional items to send to player + * @param maxStorageTimeSeconds Optional time to collect items before they expire + */ + sendUserMessageToPlayer(playerId: string, senderDetails: IUserDialogInfo, message: string, items?: Item[], maxStorageTimeSeconds?: any): void; + /** + * Large function to send messages to players from a variety of sources (SYSTEM/NPC/USER) + * Helper functions in this class are availble to simplify common actions + * @param messageDetails Details needed to send a message to the player + */ + sendMessageToPlayer(messageDetails: ISendMessageDetails): void; + /** + * Send a message from the player to an NPC + * @param sessionId Player id + * @param targetNpcId NPC message is sent to + * @param message Text to send to NPC + */ + sendPlayerMessageToNpc(sessionId: string, targetNpcId: string, message: string): void; + /** + * Create a message for storage inside a dialog in the player profile + * @param senderDialog Id of dialog that will hold the message + * @param messageDetails Various details on what the message must contain/do + * @returns Message + */ + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + /** + * Add items to message and adjust various properties to reflect the items being added + * @param message Message to add items to + * @param itemsToSendToPlayer Items to add to message + * @param maxStorageTimeSeconds total time items are stored in mail before being deleted + */ + protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems, maxStorageTimeSeconds: number): void; + /** + * perform various sanitising actions on the items before they're considered ready for insertion into message + * @param dialogType The type of the dialog that will hold the reward items being processed + * @param messageDetails + * @returns Sanitised items + */ + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + /** + * Get a dialog with a specified entity (user/trader) + * Create and store empty dialog if none exists in profile + * @param messageDetails Data on what message should do + * @returns Relevant Dialogue + */ + protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + /** + * Get the appropriate sender id by the sender enum type + * @param messageDetails + * @returns gets an id of the individual sending it + */ + protected getMessageSenderIdByType(messageDetails: ISendMessageDetails): string; +} diff --git a/TypeScript/9RouterHooks/types/services/MatchBotDetailsCacheService.d.ts b/TypeScript/9RouterHooks/types/services/MatchBotDetailsCacheService.d.ts index 757f61f..eb365dd 100644 --- a/TypeScript/9RouterHooks/types/services/MatchBotDetailsCacheService.d.ts +++ b/TypeScript/9RouterHooks/types/services/MatchBotDetailsCacheService.d.ts @@ -1,10 +1,12 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { ILogger } from "../models/spt/utils/ILogger"; +import { LocalisationService } from "./LocalisationService"; /** Cache bots in a dictionary, keyed by the bots name, keying by name isnt idea as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name */ export declare class MatchBotDetailsCacheService { protected logger: ILogger; + protected localisationService: LocalisationService; protected botDetailsCache: Record; - constructor(logger: ILogger); + constructor(logger: ILogger, localisationService: LocalisationService); /** * Store a bot in the cache, keyed by its name * @param botToCache Bot details to cache diff --git a/TypeScript/9RouterHooks/types/services/PlayerService.d.ts b/TypeScript/9RouterHooks/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/9RouterHooks/types/services/PlayerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 8d23ebc..418626d 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -1,11 +1,16 @@ import { HideoutHelper } from "../helpers/HideoutHelper"; +import { InventoryHelper } from "../helpers/InventoryHelper"; +import { ItemHelper } from "../helpers/ItemHelper"; 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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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,15 +19,21 @@ export declare class ProfileFixerService { protected logger: ILogger; protected watermark: Watermark; protected hideoutHelper: HideoutHelper; + protected inventoryHelper: InventoryHelper; + protected itemHelper: ItemHelper; 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; + protected ragfairConfig: IRagfairConfig; + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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 */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + protected adjustUnreasonableModFleaPrices(): void; /** * Add tag to profile to indicate when it was made * @param fullProfile @@ -91,9 +102,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 diff --git a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts index d3f56c6..e245efa 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairPriceService.d.ts @@ -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"; @@ -12,6 +12,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Stores flea prices for items as well as methods to interact with them */ @@ -23,18 +24,19 @@ export declare class RagfairPriceService implements OnLoad { protected presetHelper: PresetHelper; protected traderHelper: TraderHelper; protected randomUtil: RandomUtil; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; protected generatedDynamicPrices: boolean; protected generatedStaticPrices: boolean; protected prices: IRagfairServerPrices; - constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, configServer: ConfigServer); + constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, traderHelper: TraderHelper, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries */ onLoad(): Promise; /** - * Add placeholder values for the new sealed weapon containers + * Add placeholder values for items missing from handbook */ protected addMissingHandbookPrices(): void; getRoute(): string; @@ -111,7 +113,7 @@ export declare class RagfairPriceService implements OnLoad { * @param item base weapon * @param items weapon plus mods * @param existingPrice price of existing base weapon - * @returns + * @returns price of weapon in roubles */ protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; /** @@ -126,8 +128,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; }; } diff --git a/TypeScript/9RouterHooks/types/services/RepairService.d.ts b/TypeScript/9RouterHooks/types/services/RepairService.d.ts index a3c6c7a..2f7d1db 100644 --- a/TypeScript/9RouterHooks/types/services/RepairService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RepairService.d.ts @@ -14,6 +14,7 @@ import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RandomUtil } from "../utils/RandomUtil"; +import { LocalisationService } from "./LocalisationService"; import { PaymentService } from "./PaymentService"; export declare class RepairService { protected logger: ILogger; @@ -25,9 +26,10 @@ export declare class RepairService { protected weightedRandomHelper: WeightedRandomHelper; protected paymentService: PaymentService; protected repairHelper: RepairHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Use trader to repair an items durability * @param sessionID Session id diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 7474018..9fb3454 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -1,20 +1,30 @@ import { BotHelper } from "../helpers/BotHelper"; -import { Config } from "../models/eft/common/IGlobals"; +import { ProfileHelper } from "../helpers/ProfileHelper"; +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"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; +import { GiftService } from "./GiftService"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; + protected giftService: GiftService; protected localisationService: LocalisationService; protected botHelper: BotHelper; + protected profileHelper: ProfileHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, giftService: GiftService, localisationService: LocalisationService, botHelper: BotHelper, profileHelper: ProfileHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -42,7 +52,7 @@ export declare class SeasonalEventService { */ getAllSeasonalEventItems(): string[]; /** - * Get an array of seasonal items that should be blocked as seasonal is not active + * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings */ getSeasonalEventItemsToBlock(): string[]; @@ -52,12 +62,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,16 +81,24 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; /** - * Check if current date falls inside any of the seasons events pased in, if so, handle them + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related */ - checkForAndEnableSeasonalEvents(): void; + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; + /** + * Check if current date falls inside any of the seasons events pased in, if so, handle them + * @param sessionId Players id + */ + checkForAndEnableSeasonalEvents(sessionId: string): void; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param nodeInventory Bots inventory to iterate over @@ -89,10 +107,16 @@ export declare class SeasonalEventService { removeChristmasItemsFromBotInventory(nodeInventory: Inventory, botRole: string): void; /** * Make adjusted to server code based on the name of the event passed in + * @param sessionId Player id * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +125,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -111,4 +135,10 @@ export declare class SeasonalEventService { * Add santa to maps */ protected addGifterBotToMaps(): void; + /** + * Send gift to player if they'e not already received it + * @param playerId Player to send gift to + * @param giftkey Key of gift to give + */ + protected giveGift(playerId: string, giftkey: string): void; } diff --git a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts index 7e7c88f..25b02ad 100644 --- a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts @@ -4,6 +4,7 @@ import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { TimeUtil } from "../utils/TimeUtil"; +import { LocalisationService } from "./LocalisationService"; /** * Help with storing limited item purchases from traders in profile to persist them over server restarts */ @@ -11,9 +12,10 @@ export declare class TraderPurchasePersisterService { protected logger: ILogger; protected timeUtil: TimeUtil; protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; protected configServer: ConfigServer; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); /** * Get the purchases made from a trader for this profile before the last trader reset * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts index 7698f07..b1afefc 100644 --- a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts @@ -26,20 +26,25 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): Promise; - private onReadValidate; + protected onReadValidate(fileWithPath: string, data: string): void; getRoute(): string; - private validateFile; + protected validateFile(filePathAndName: string, fileData: any): boolean; /** * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key diff --git a/TypeScript/9RouterHooks/types/utils/RagfairOfferHolder.d.ts b/TypeScript/9RouterHooks/types/utils/RagfairOfferHolder.d.ts index 46d9e23..cc294da 100644 --- a/TypeScript/9RouterHooks/types/utils/RagfairOfferHolder.d.ts +++ b/TypeScript/9RouterHooks/types/utils/RagfairOfferHolder.d.ts @@ -1,8 +1,8 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; export declare class RagfairOfferHolder { - private offersById; - private offersByTemplate; - private offersByTrader; + protected offersById: Map; + protected offersByTemplate: Map>; + protected offersByTrader: Map>; constructor(); getOfferById(id: string): IRagfairOffer; getOffersByTemplate(templateId: string): Array; @@ -18,7 +18,7 @@ export declare class RagfairOfferHolder { * @returns IRagfairOffer array */ getStaleOffers(time: number): Array; - 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; } diff --git a/TypeScript/9RouterHooks/types/utils/VFS.d.ts b/TypeScript/9RouterHooks/types/utils/VFS.d.ts index 267b10f..842150c 100644 --- a/TypeScript/9RouterHooks/types/utils/VFS.d.ts +++ b/TypeScript/9RouterHooks/types/utils/VFS.d.ts @@ -45,9 +45,9 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; - 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; diff --git a/TypeScript/9RouterHooks/types/utils/Watermark.d.ts b/TypeScript/9RouterHooks/types/utils/Watermark.d.ts index f870cf1..fa63205 100644 --- a/TypeScript/9RouterHooks/types/utils/Watermark.d.ts +++ b/TypeScript/9RouterHooks/types/utils/Watermark.d.ts @@ -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; }