Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
0b15423a42 | |||
1a02be7963 | |||
37cc39c0f8 | |||
0d98ee659b | |||
f547cb2ddb | |||
29eb7fb803 | |||
478b503af3 | |||
be199850d1 | |||
acac743403 | |||
a30bab42ac | |||
8200256aff | |||
c6694d5225 | |||
b62bb14bab | |||
bd852a938f | |||
|
711b0b6f4d | ||
6ae0a87979 | |||
13ed285b9a | |||
3377384c45 | |||
bd8cceeb6e | |||
30ce0f1538 | |||
18f4b57fb5 | |||
c13e1ccc0e | |||
094300ec84 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -52,3 +52,4 @@ WIP/CWX-BackpackReload/CWX-BackpackReload/obj
|
|||||||
|
|
||||||
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/bin
|
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/bin
|
||||||
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/obj
|
WIP/CWX-BUNDLEMAKER/BUNDLEMAKER/obj
|
||||||
|
Live/CWX_Mods.sln.DotSettings.user
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
// This file is used by Code Analysis to maintain SuppressMessage
|
|
||||||
// attributes that are applied to this project.
|
|
||||||
// Project-level suppressions either have no target or are given
|
|
||||||
// a specific target and scoped to a namespace, type, member, etc.
|
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "<Pending>", Scope = "member", Target = "~M:DeSharpener.DeSharpener.PatchPrefix~System.Boolean")]
|
|
@ -1,35 +0,0 @@
|
|||||||
University of Illinois/NCSA Open Source License
|
|
||||||
|
|
||||||
Copyright (c) [year] [fullname]. All rights reserved.
|
|
||||||
|
|
||||||
Developed by:
|
|
||||||
[CWX]
|
|
||||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
|
||||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
|
||||||
obtaining a copy of this software and associated documentation files
|
|
||||||
(the "Software"), to deal with the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimers.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimers in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
* Neither the names of [fullname], [project] nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this Software without specific prior written permission.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
|
|
||||||
THE SOFTWARE.
|
|
6
Live/CWX_DebugTool/types/ErrorHandler.d.ts
vendored
6
Live/CWX_DebugTool/types/ErrorHandler.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
export declare class ErrorHandler {
|
|
||||||
private logger;
|
|
||||||
private readLine;
|
|
||||||
constructor();
|
|
||||||
handleCriticalError(err: any): void;
|
|
||||||
}
|
|
5
Live/CWX_DebugTool/types/Program.d.ts
vendored
5
Live/CWX_DebugTool/types/Program.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
export declare class Program {
|
|
||||||
private errorHandler;
|
|
||||||
constructor();
|
|
||||||
start(): void;
|
|
||||||
}
|
|
3
Live/CWX_DebugTool/types/TYPES.d.ts
vendored
3
Live/CWX_DebugTool/types/TYPES.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
export declare const TYPES: {
|
|
||||||
[name: string]: symbol;
|
|
||||||
};
|
|
@ -1,36 +0,0 @@
|
|||||||
import { BotController } from "../controllers/BotController";
|
|
||||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class BotCallbacks {
|
|
||||||
protected botController: BotController;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/limit
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/difficulty
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle client/game/bot/generate
|
|
||||||
* @returns IGetBodyResponseData
|
|
||||||
*/
|
|
||||||
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/maxCap
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotCap(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotBehaviours(): string;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { BundleLoader } from "../loaders/BundleLoader";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class BundleCallbacks {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected httpFileUtil: HttpFileUtil;
|
|
||||||
protected bundleLoader: BundleLoader;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
|
||||||
getBundle(url: string, info: any, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
import { CustomizationController } from "../controllers/CustomizationController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
|
||||||
import { IGetSuitsResponse } from "../models/eft/customization/IGetSuitsResponse";
|
|
||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class CustomizationCallbacks {
|
|
||||||
protected customizationController: CustomizationController;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* Handles client/trading/customization/storage
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
|
||||||
/**
|
|
||||||
* Handles client/trading/customization
|
|
||||||
* @returns ISuit[]
|
|
||||||
*/
|
|
||||||
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
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 { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
|
||||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
/**
|
|
||||||
* Handle client requests
|
|
||||||
*/
|
|
||||||
export declare class DataCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
|
||||||
/**
|
|
||||||
* Handles client/settings
|
|
||||||
* @returns ISettingsBase
|
|
||||||
*/
|
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
|
||||||
/**
|
|
||||||
* Handles client/globals
|
|
||||||
* @returns IGlobals
|
|
||||||
*/
|
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
|
||||||
/**
|
|
||||||
* Handles client/items
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handles client/handbook/templates
|
|
||||||
* @returns IHandbookBase
|
|
||||||
*/
|
|
||||||
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
|
||||||
/**
|
|
||||||
* Handles client/customization
|
|
||||||
* @returns Record<string, ICustomizationItem
|
|
||||||
*/
|
|
||||||
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
|
||||||
/**
|
|
||||||
* Handles client/account/customization
|
|
||||||
* @returns string[]
|
|
||||||
*/
|
|
||||||
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
|
||||||
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
|
||||||
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
|
||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
import { DialogueController } from "../controllers/DialogueController";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
|
||||||
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
|
||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
|
||||||
import { IGetChatServerListRequestData } from "../models/eft/dialog/IGetChatServerListRequestData";
|
|
||||||
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
|
||||||
import { IGetMailDialogInfoRequestData } from "../models/eft/dialog/IGetMailDialogInfoRequestData";
|
|
||||||
import { IGetMailDialogListRequestData } from "../models/eft/dialog/IGetMailDialogListRequestData";
|
|
||||||
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
|
|
||||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
|
||||||
import { IPinDialogRequestData } from "../models/eft/dialog/IPinDialogRequestData";
|
|
||||||
import { IRemoveDialogRequestData } from "../models/eft/dialog/IRemoveDialogRequestData";
|
|
||||||
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
|
||||||
import { ISetDialogReadRequestData } from "../models/eft/dialog/ISetDialogReadRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class DialogueCallbacks extends OnUpdate {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected dialogueController: DialogueController;
|
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
|
||||||
/**
|
|
||||||
* Handles client/friend/list
|
|
||||||
* @returns IGetFriendListDataResponse
|
|
||||||
*/
|
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
|
||||||
/**
|
|
||||||
* Handles client/chatServer/list
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
|
||||||
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
|
||||||
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
|
||||||
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
/**
|
|
||||||
* Handles client/mail/dialog/getAllAttachments
|
|
||||||
* @returns IGetAllAttachmentsResponse
|
|
||||||
*/
|
|
||||||
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
|
||||||
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
|
||||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
import { GameController } from "../controllers/GameController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
|
||||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
|
||||||
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
|
||||||
import { IGameLogoutResponseData } from "../models/eft/game/IGameLogoutResponseData";
|
|
||||||
import { IGameStartResponse } from "../models/eft/game/IGameStartResponse";
|
|
||||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
|
||||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { Watermark } from "../utils/Watermark";
|
|
||||||
declare class GameCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected watermark: Watermark;
|
|
||||||
protected gameController: GameController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
|
||||||
/**
|
|
||||||
* Handle client/game/version/validate
|
|
||||||
* @returns INullResponseData
|
|
||||||
*/
|
|
||||||
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle client/game/start
|
|
||||||
* @returns IGameStartResponse
|
|
||||||
*/
|
|
||||||
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameStartResponse>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/logout
|
|
||||||
* @returns IGameLogoutResponseData
|
|
||||||
*/
|
|
||||||
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameLogoutResponseData>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/config
|
|
||||||
* @returns IGameConfigResponse
|
|
||||||
*/
|
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
|
||||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/keepalive
|
|
||||||
* @returns IGameKeepAliveResponse
|
|
||||||
*/
|
|
||||||
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/version
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
||||||
export { GameCallbacks };
|
|
@ -1,8 +0,0 @@
|
|||||||
import { HandbookController } from "../controllers/HandbookController";
|
|
||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
export declare class HandbookCallbacks extends OnLoad {
|
|
||||||
protected handbookController: HandbookController;
|
|
||||||
constructor(handbookController: HandbookController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
import { HealthController } from "../controllers/HealthController";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
|
||||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
|
||||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class HealthCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected healthController: HealthController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
|
||||||
/**
|
|
||||||
* Custom aki server request found in modules/HealthSynchronizer.cs
|
|
||||||
* @param url
|
|
||||||
* @param info HealthListener.Instance.CurrentHealth class
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns empty response, no data sent back to client
|
|
||||||
*/
|
|
||||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
/**
|
|
||||||
* Handle Eat
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle Heal
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle RestoreHealth
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,96 +0,0 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
|
||||||
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
|
||||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
|
||||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
|
||||||
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
export declare class HideoutCallbacks extends OnUpdate {
|
|
||||||
protected hideoutController: HideoutController;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected hideoutConfig: IHideoutConfig;
|
|
||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
|
||||||
configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Handle HideoutUpgrade
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutUpgradeComplete
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutTakeItemsFromAreaSlots
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutToggleArea
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutSingleProductionStart
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutScavCaseProductionStart
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutContinuousProductionStart
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutTakeProduction
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { HttpServer } from "../servers/HttpServer";
|
|
||||||
export declare class HttpCallbacks extends OnLoad {
|
|
||||||
protected httpServer: HttpServer;
|
|
||||||
constructor(httpServer: HttpServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
getImage(): string;
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
import { InraidController } from "../controllers/InraidController";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
/**
|
|
||||||
* Handle client requests
|
|
||||||
*/
|
|
||||||
export declare class InraidCallbacks {
|
|
||||||
protected inraidController: InraidController;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* Handle client/location/getLocalloot
|
|
||||||
* @param url
|
|
||||||
* @param info register player request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Null http response
|
|
||||||
*/
|
|
||||||
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle raid/profile/save
|
|
||||||
* @param url
|
|
||||||
* @param info Save progress request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Null http response
|
|
||||||
*/
|
|
||||||
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/raid/endstate
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getRaidEndState(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/raid/menu
|
|
||||||
* @returns JSON as string
|
|
||||||
*/
|
|
||||||
getRaidMenuSettings(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/weapon/durability
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getWeaponDurability(): string;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/airdrop/config
|
|
||||||
* @returns JSON as string
|
|
||||||
*/
|
|
||||||
getAirdropConfig(): string;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
import { InsuranceController } from "../controllers/InsuranceController";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
|
||||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
|
||||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class InsuranceCallbacks extends OnUpdate {
|
|
||||||
protected insuranceController: InsuranceController;
|
|
||||||
protected insuranceService: InsuranceService;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
|
||||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Handle client/insurance/items/list/cost
|
|
||||||
* @returns IGetInsuranceCostResponseData
|
|
||||||
*/
|
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
|
||||||
/**
|
|
||||||
* Handle Insure
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
import { InventoryController } from "../controllers/InventoryController";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
|
||||||
import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInventoryCreateMarkerRequestData";
|
|
||||||
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
|
|
||||||
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
|
||||||
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
|
||||||
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
|
||||||
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
|
||||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
|
||||||
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
|
||||||
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
|
||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
|
||||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
export declare class InventoryCallbacks {
|
|
||||||
protected inventoryController: InventoryController;
|
|
||||||
constructor(inventoryController: InventoryController);
|
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
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;
|
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
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;
|
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
|
||||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class ItemEventCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected itemEventRouter: ItemEventRouter;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
|
||||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
|
||||||
protected getErrorCode(warnings: Warning[]): number;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
import { LauncherController } from "../controllers/LauncherController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
|
||||||
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
|
||||||
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
|
||||||
import { IRemoveProfileData } from "../models/eft/launcher/IRemoveProfileData";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { Watermark } from "../utils/Watermark";
|
|
||||||
declare class LauncherCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected launcherController: LauncherController;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected watermark: Watermark;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark);
|
|
||||||
connect(): string;
|
|
||||||
login(url: string, info: ILoginRequestData, sessionID: string): string;
|
|
||||||
register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK";
|
|
||||||
get(url: string, info: ILoginRequestData, sessionID: string): string;
|
|
||||||
changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK";
|
|
||||||
changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK";
|
|
||||||
wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK";
|
|
||||||
getServerVersion(): string;
|
|
||||||
ping(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string;
|
|
||||||
getCompatibleTarkovVersion(): string;
|
|
||||||
}
|
|
||||||
export { LauncherCallbacks };
|
|
@ -1,15 +0,0 @@
|
|||||||
import { LocationController } from "../controllers/LocationController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
|
||||||
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class LocationCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected locationController: LocationController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
|
||||||
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
|
||||||
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
|
||||||
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
import { MatchController } from "../controllers/MatchController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
|
||||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
|
||||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class MatchCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected matchController: MatchController;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
|
||||||
updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData;
|
|
||||||
exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
|
||||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
|
||||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
|
||||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
|
||||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
|
||||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
|
||||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
|
||||||
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
|
||||||
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
/**
|
|
||||||
* Handle client/match/group/status
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
declare class ModCallbacks extends OnLoad {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected httpFileUtil: HttpFileUtil;
|
|
||||||
protected postAkiModLoader: PostAkiModLoader;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
|
||||||
getBundle(url: string, info: any, sessionID: string): string;
|
|
||||||
}
|
|
||||||
export { ModCallbacks };
|
|
@ -1,11 +0,0 @@
|
|||||||
import { NoteController } from "../controllers/NoteController";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
|
||||||
export declare class NoteCallbacks {
|
|
||||||
protected noteController: NoteController;
|
|
||||||
constructor(noteController: NoteController);
|
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
import { NotifierController } from "../controllers/NotifierController";
|
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
|
||||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class NotifierCallbacks {
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected notifierController: NotifierController;
|
|
||||||
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController);
|
|
||||||
/**
|
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
|
||||||
* because notification requests can be long-polling. In fact, we SHOULD wait
|
|
||||||
* until we actually have something to send because otherwise we'd spam the client
|
|
||||||
* and the client would abort the connection due to spam.
|
|
||||||
*/
|
|
||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/select
|
|
||||||
* @returns ISelectProfileResponse
|
|
||||||
*/
|
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import { PresetBuildController } from "../controllers/PresetBuildController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class PresetBuildCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected presetBuildController: PresetBuildController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
|
||||||
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
import { PresetController } from "../controllers/PresetController";
|
|
||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
export declare class PresetCallbacks extends OnLoad {
|
|
||||||
protected presetController: PresetController;
|
|
||||||
constructor(presetController: PresetController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
import { ProfileController } from "../controllers/ProfileController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
|
||||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
|
||||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
|
||||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
|
||||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
|
||||||
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
|
||||||
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
/** Handle profile related client events */
|
|
||||||
export declare class ProfileCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected profileController: ProfileController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
|
||||||
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
/**
|
|
||||||
* Get the complete player profile (scav + pmc character)
|
|
||||||
* @param url
|
|
||||||
* @param info Empty
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Profile object
|
|
||||||
*/
|
|
||||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
/**
|
|
||||||
* Handle 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
|
|
||||||
* @param info empty
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Profile object
|
|
||||||
*/
|
|
||||||
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/voice/change event
|
|
||||||
* @param url
|
|
||||||
* @param info Change voice request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Client response
|
|
||||||
*/
|
|
||||||
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/nickname/change event
|
|
||||||
* Client allows player to adjust their profile name
|
|
||||||
* @param url
|
|
||||||
* @param info Change nickname request object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns client response
|
|
||||||
*/
|
|
||||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
/**
|
|
||||||
* Called when creating a character when choosing a character face/voice
|
|
||||||
* @param url
|
|
||||||
* @param info response (empty)
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
|
||||||
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
|
|
||||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
|
||||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
import { QuestController } from "../controllers/QuestController";
|
|
||||||
import { RepeatableQuestController } from "../controllers/RepeatableQuestController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
|
||||||
import { IPmcDataRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
|
||||||
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
|
||||||
import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestData";
|
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class QuestCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected questController: QuestController;
|
|
||||||
protected repeatableQuestController: RepeatableQuestController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
|
||||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/quest/list
|
|
||||||
* @param url
|
|
||||||
* @param info
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
|
||||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
import { RagfairController } from "../controllers/RagfairController";
|
|
||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData";
|
|
||||||
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
|
||||||
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
|
||||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
|
||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
|
||||||
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
|
||||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
/**
|
|
||||||
* Handle ragfair related callback events
|
|
||||||
*/
|
|
||||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected ragfairServer: RagfairServer;
|
|
||||||
protected ragfairController: RagfairController;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
|
||||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { RepairController } from "../controllers/RepairController";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
|
||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
|
||||||
export declare class RepairCallbacks {
|
|
||||||
protected repairController: RepairController;
|
|
||||||
constructor(repairController: RepairController);
|
|
||||||
/**
|
|
||||||
* use trader to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Use repair kit to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
constructor(saveServer: SaveServer);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
import { TradeController } from "../controllers/TradeController";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
|
||||||
export declare class TradeCallbacks {
|
|
||||||
protected tradeController: TradeController;
|
|
||||||
constructor(tradeController: TradeController);
|
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
import { TraderController } from "../controllers/TraderController";
|
|
||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected traderController: TraderController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
onUpdate(): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
|
||||||
/**
|
|
||||||
* Handle client/trading/api/getUserAssortPrice/trader
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
import { WeatherController } from "../controllers/WeatherController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
export declare class WeatherCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected weatherController: WeatherController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
|
||||||
/**
|
|
||||||
* Handle client/weather
|
|
||||||
* @returns IWeatherData
|
|
||||||
*/
|
|
||||||
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IWeatherData>;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { WishlistController } from "../controllers/WishlistController";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
|
||||||
export declare class WishlistCallbacks {
|
|
||||||
protected wishlistController: WishlistController;
|
|
||||||
constructor(wishlistController: WishlistController);
|
|
||||||
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
import { ContextVariable } from "./ContextVariable";
|
|
||||||
import { ContextVariableType } from "./ContextVariableType";
|
|
||||||
export declare class ApplicationContext {
|
|
||||||
private variables;
|
|
||||||
private static holderMaxSize;
|
|
||||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
|
||||||
getValues(type: ContextVariableType): ContextVariable[];
|
|
||||||
addValue(type: ContextVariableType, value: any): void;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { ContextVariableType } from "./ContextVariableType";
|
|
||||||
export declare class ContextVariable {
|
|
||||||
private value;
|
|
||||||
private timestamp;
|
|
||||||
private type;
|
|
||||||
constructor(value: any, type: ContextVariableType);
|
|
||||||
getValue<T>(): T;
|
|
||||||
getTimestamp(): Date;
|
|
||||||
getType(): ContextVariableType;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
export declare enum ContextVariableType {
|
|
||||||
/** Logged in users session id */
|
|
||||||
SESSION_ID = 0,
|
|
||||||
/** Currently acive raid information */
|
|
||||||
MATCH_INFO = 1,
|
|
||||||
/** Timestamp when client first connected */
|
|
||||||
CLIENT_START_TIMESTAMP = 2
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { BotGenerator } from "../generators/BotGenerator";
|
|
||||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
|
||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
|
||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class BotController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected botGenerator: BotGenerator;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
static readonly pmcTypeLabel = "PMC";
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
|
||||||
/**
|
|
||||||
* Return the number of bot loadout varieties to be generated
|
|
||||||
* @param type bot Type we want the loadout gen count for
|
|
||||||
* @returns number of bots to generate
|
|
||||||
*/
|
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
|
||||||
/**
|
|
||||||
* Get the core.json difficulty settings from database\bots
|
|
||||||
* @returns IBotCore
|
|
||||||
*/
|
|
||||||
getBotCoreDifficulty(): IBotCore;
|
|
||||||
/**
|
|
||||||
* Get bot difficulty settings
|
|
||||||
* adjust PMC settings to ensure they engage the correct bot types
|
|
||||||
* @param type what bot the server is requesting settings for
|
|
||||||
* @param difficulty difficulty level server requested settings for
|
|
||||||
* @returns Difficulty object
|
|
||||||
*/
|
|
||||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
|
||||||
/**
|
|
||||||
* Generate bot profiles and store in cache
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param info bot generation request info
|
|
||||||
* @returns IBotBase array
|
|
||||||
*/
|
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
|
||||||
/**
|
|
||||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
|
||||||
* @param requestedDifficulty
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getPMCDifficulty(requestedDifficulty: string): string;
|
|
||||||
/**
|
|
||||||
* Get the max number of bots allowed on a map
|
|
||||||
* Looks up location player is entering when getting cap value
|
|
||||||
* @returns cap number
|
|
||||||
*/
|
|
||||||
getBotCap(): number;
|
|
||||||
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
|
||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
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";
|
|
||||||
export declare class CustomizationController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
|
||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
|
||||||
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
|
||||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
|
||||||
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class DialogueController {
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
|
||||||
update(): void;
|
|
||||||
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
|
||||||
/**
|
|
||||||
* Create array holding trader dialogs and mail interactions with player
|
|
||||||
* Set the content of the dialogue on the list tab.
|
|
||||||
* @param sessionID Session Id
|
|
||||||
* @returns array of dialogs
|
|
||||||
*/
|
|
||||||
generateDialogueList(sessionID: string): DialogueInfo[];
|
|
||||||
/**
|
|
||||||
* Get the content of a dialogue
|
|
||||||
* @param dialogueID Dialog id
|
|
||||||
* @param sessionID Session Id
|
|
||||||
* @returns DialogueInfo
|
|
||||||
*/
|
|
||||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
* @returns IGetMailDialogViewResponseData object
|
|
||||||
*/
|
|
||||||
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
|
||||||
/**
|
|
||||||
* Get a count of messages with attachments from a particular dialog
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param dialogueID Dialog id
|
|
||||||
* @returns Count of messages with attachments
|
|
||||||
*/
|
|
||||||
protected getUnreadMessagesWithAttachmentsCount(sessionID: string, dialogueID: string): number;
|
|
||||||
/**
|
|
||||||
* Does array have messages with uncollected rewards (includes expired rewards)
|
|
||||||
* @param messages Messages to check
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* Get all uncollected items attached to mail in a particular dialog
|
|
||||||
* @param dialogueID Dialog to get mail attachments from
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
|
||||||
/**
|
|
||||||
* Get messages from a specific dialog that have items not expired
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param dialogueId Dialog to get mail attachments from
|
|
||||||
* @returns Message array
|
|
||||||
*/
|
|
||||||
protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[];
|
|
||||||
/**
|
|
||||||
* Return array of messages with uncollected items (includes expired)
|
|
||||||
* @param messages Messages to parse
|
|
||||||
* @returns messages with items to collect
|
|
||||||
*/
|
|
||||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
|
||||||
/**
|
|
||||||
* Delete expired items. triggers when updating traders.
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
protected removeExpiredItems(sessionID: string): void;
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
|
||||||
export declare class GameController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected seasonalEventService: SeasonalEventService;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected httpConfig: IHttpConfig;
|
|
||||||
protected coreConfig: ICoreConfig;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
|
||||||
/**
|
|
||||||
* Blank out the "test" mail message from prapor
|
|
||||||
*/
|
|
||||||
protected removePraporTestMessage(): void;
|
|
||||||
/**
|
|
||||||
* Make non-trigger-spawned raiders spawn earlier + always
|
|
||||||
*/
|
|
||||||
protected adjustLabsRaiderSpawnRate(): void;
|
|
||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
|
||||||
getServer(): IServerDetails[];
|
|
||||||
getValidGameVersion(): ICheckVersionResponse;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
export declare class HandbookController {
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
|
|
||||||
load(): void;
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
|
||||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
|
||||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
export declare class HealthController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected healthHelper: HealthHelper;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
|
||||||
/**
|
|
||||||
* stores in-raid player health
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param info Request data
|
|
||||||
* @param sessionID
|
|
||||||
* @param addEffects Should effects found be added or removed from profile
|
|
||||||
*/
|
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
|
||||||
/**
|
|
||||||
* When healing in menu
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Occurs on post-raid healing page
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param info Request data from client
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,106 +0,0 @@
|
|||||||
import { ScavCaseRewardGenerator } from "../generators/ScavCaseRewardGenerator";
|
|
||||||
import { HideoutHelper } from "../helpers/HideoutHelper";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
|
||||||
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
|
||||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
|
||||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PlayerService } from "../services/PlayerService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class HideoutController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected playerService: PlayerService;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected hideoutHelper: HideoutHelper;
|
|
||||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected static nameBackendCountersCrafting: string;
|
|
||||||
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);
|
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Create item in hideout slot item array, remove item from player inventory
|
|
||||||
* @param pmcData Profile data
|
|
||||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse object
|
|
||||||
*/
|
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param pmcData Profile to update
|
|
||||||
* @param removeResourceRequest client request
|
|
||||||
* @param output response to send to client
|
|
||||||
* @param hideoutArea Area fuel is being removed from
|
|
||||||
* @returns IItemEventRouterResponse response
|
|
||||||
*/
|
|
||||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handles event after clicking 'start' on the scav case hideout page
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param body client request object
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns item event router response
|
|
||||||
*/
|
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Add generated scav case rewards to player profile
|
|
||||||
* @param pmcData player profile to add rewards to
|
|
||||||
* @param rewards reward items to add to profile
|
|
||||||
*/
|
|
||||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
|
||||||
* @param sessionID
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param output
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
update(): void;
|
|
||||||
}
|
|
@ -1,130 +0,0 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|
||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
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 { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
/**
|
|
||||||
* Logic for handling In Raid callbacks
|
|
||||||
*/
|
|
||||||
export declare class InraidController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
|
||||||
protected healthHelper: HealthHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected insuranceService: InsuranceService;
|
|
||||||
protected inRaidHelper: InRaidHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected airdropConfig: IAirdropConfig;
|
|
||||||
protected inraidConfig: IInRaidConfig;
|
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Save locationid to active profiles inraid object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param info Register player request
|
|
||||||
*/
|
|
||||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
|
||||||
/**
|
|
||||||
* Save profile state to disk
|
|
||||||
* Handles pmc/pscav
|
|
||||||
* @param offraidData post-raid request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
savePostRaidProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Handle updating player profile post-pmc raid
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param offraidData post-raid data
|
|
||||||
*/
|
|
||||||
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
|
||||||
/**
|
|
||||||
* Make changes to pmc profile after they left raid dead,
|
|
||||||
* alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
|
||||||
* @param postRaidSaveRequest post-raid save request
|
|
||||||
* @param pmcData pmc profile
|
|
||||||
* @param insuranceEnabled is insurance enabled
|
|
||||||
* @param preRaidGear gear player had before raid
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns Updated profile object
|
|
||||||
*/
|
|
||||||
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
|
||||||
/**
|
|
||||||
* Adjust player characters bodypart hp if they left raid early
|
|
||||||
* @param postRaidSaveRequest post raid data
|
|
||||||
* @param pmcData player profile
|
|
||||||
*/
|
|
||||||
protected updatePmcHealthPostRaid(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData): void;
|
|
||||||
/**
|
|
||||||
* Reduce body part hp to % of max
|
|
||||||
* @param pmcData profile to edit
|
|
||||||
* @param multipler multipler to apply to max health
|
|
||||||
*/
|
|
||||||
protected reducePmcHealthToPercent(pmcData: IPmcData, multipler: number): void;
|
|
||||||
/**
|
|
||||||
* Handle updating the profile post-pscav raid
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param offraidData post-raid data of raid
|
|
||||||
*/
|
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
|
||||||
/**
|
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
|
||||||
* @param statusOnExit exit value from offraidData object
|
|
||||||
* @returns true if dead
|
|
||||||
*/
|
|
||||||
protected isPlayerDead(statusOnExit: string): boolean;
|
|
||||||
/**
|
|
||||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
|
||||||
* @param offraidData Save Progress Request
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param isPlayerScav Was the player a pScav
|
|
||||||
*/
|
|
||||||
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
|
||||||
/**
|
|
||||||
* Update profile after player completes scav raid
|
|
||||||
* @param scavData Scav profile
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @param offraidData Post-raid save request
|
|
||||||
* @param pmcData Pmc profile
|
|
||||||
* @param isDead Is player dead
|
|
||||||
*/
|
|
||||||
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
|
||||||
/**
|
|
||||||
* Update profile with scav karma values based on in-raid actions
|
|
||||||
* @param pmcData Pmc profile
|
|
||||||
* @param offraidData Post-raid save request
|
|
||||||
* @param scavData Scav profile
|
|
||||||
* @param sessionID Session id
|
|
||||||
*/
|
|
||||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Get the inraid config from configs/inraid.json
|
|
||||||
* @returns InRaid Config
|
|
||||||
*/
|
|
||||||
getInraidConfig(): IInRaidConfig;
|
|
||||||
/**
|
|
||||||
* Get airdrop config from configs/airdrop.json
|
|
||||||
* @returns Airdrop config
|
|
||||||
*/
|
|
||||||
getAirdropConfig(): IAirdropConfig;
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
|
||||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
|
||||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class InsuranceController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected insuranceService: InsuranceService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
|
||||||
processReturn(): void;
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Calculate insurance cost
|
|
||||||
* @param info request object
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns response object to send to client
|
|
||||||
*/
|
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
|
||||||
}
|
|
@ -1,146 +0,0 @@
|
|||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
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";
|
|
||||||
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
|
|
||||||
import { IInventoryExamineRequestData } from "../models/eft/inventory/IInventoryExamineRequestData";
|
|
||||||
import { IInventoryFoldRequestData } from "../models/eft/inventory/IInventoryFoldRequestData";
|
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
|
||||||
import { IInventoryReadEncyclopediaRequestData } from "../models/eft/inventory/IInventoryReadEncyclopediaRequestData";
|
|
||||||
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
|
||||||
import { IInventorySortRequestData } from "../models/eft/inventory/IInventorySortRequestData";
|
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
|
||||||
import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwapRequestData";
|
|
||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
|
||||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class InventoryController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
|
||||||
/**
|
|
||||||
* Move Item
|
|
||||||
* change location of item with parentId and slotId
|
|
||||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
|
||||||
* otherwise, move is contained within the same profile_f.
|
|
||||||
* @param pmcData Profile
|
|
||||||
* @param moveRequest Move request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Remove Item from Profile
|
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
|
||||||
*/
|
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
|
||||||
* Removes item from PMC Profile
|
|
||||||
*/
|
|
||||||
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Split Item
|
|
||||||
* spliting 1 item-stack into 2 separate items ...
|
|
||||||
*/
|
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Merge Item
|
|
||||||
* merges 2 items into one, deletes item from `body.item` and adding number of stacks into `body.with`
|
|
||||||
*/
|
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Transfer item
|
|
||||||
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
|
||||||
*/
|
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Swap Item
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Toggles "Toggleable" items like night vision goggles and face shields.
|
|
||||||
*/
|
|
||||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Add a tag to an inventory item
|
|
||||||
* @param pmcData profile with item to add tag to
|
|
||||||
* @param body tag request data
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns client response object
|
|
||||||
*/
|
|
||||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handles examining an item
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param body request object
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns response
|
|
||||||
*/
|
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Get the tplid of an item from the examine request object
|
|
||||||
* @param body response request
|
|
||||||
* @returns tplid
|
|
||||||
*/
|
|
||||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handles sorting of Inventory.
|
|
||||||
*/
|
|
||||||
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 event fired when a container is unpacked (currently only the halloween pumpkin)
|
|
||||||
* @param pmcData Profile data
|
|
||||||
* @param body open loot container request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
||||||
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
|
||||||
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
|
||||||
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
|
||||||
import { Info } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
export declare class LauncherController {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected coreConfig: ICoreConfig;
|
|
||||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
|
||||||
connect(): any;
|
|
||||||
find(sessionIdKey: string): Info;
|
|
||||||
login(info: ILoginRequestData): string;
|
|
||||||
register(info: IRegisterData): string;
|
|
||||||
protected createAccount(info: IRegisterData): string;
|
|
||||||
changeUsername(info: IChangeRequestData): string;
|
|
||||||
changePassword(info: IChangeRequestData): string;
|
|
||||||
wipe(info: IRegisterData): string;
|
|
||||||
getCompatibleTarkovVersion(): string;
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
import { LocationGenerator } from "../generators/LocationGenerator";
|
|
||||||
import { LootGenerator } from "../generators/LootGenerator";
|
|
||||||
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
|
||||||
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class LocationController {
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected locationGenerator: LocationGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected lootGenerator: LootGenerator;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected airdropConfig: IAirdropConfig;
|
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
|
||||||
get(location: string): ILocationBase;
|
|
||||||
generate(name: string): ILocationBase;
|
|
||||||
generateAll(): ILocationsGenerateAllResponse;
|
|
||||||
/**
|
|
||||||
* Get loot for an airdop container
|
|
||||||
* Generates it randomly based on config/airdrop.json values
|
|
||||||
* @returns Array of LootItem
|
|
||||||
*/
|
|
||||||
getAirdropLoot(): LootItem[];
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequestData";
|
|
||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
|
||||||
import { BotDifficulty } from "../models/enums/BotDifficulty";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
|
||||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
|
||||||
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
|
||||||
import { MatchLocationService } from "../services/MatchLocationService";
|
|
||||||
import { OpenZoneService } from "../services/OpenZoneService";
|
|
||||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
|
||||||
export declare class MatchController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected matchLocationService: MatchLocationService;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected botLootCacheService: BotLootCacheService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
|
||||||
protected customLocationWaveService: CustomLocationWaveService;
|
|
||||||
protected openZoneService: OpenZoneService;
|
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected matchConfig: IMatchConfig;
|
|
||||||
protected inraidConfig: IInRaidConfig;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
|
||||||
getEnabled(): boolean;
|
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
|
||||||
deleteGroup(info: any): void;
|
|
||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
|
||||||
protected getMatch(location: string): any;
|
|
||||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
|
||||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Convert a difficulty value from pre-raid screen to a bot difficulty
|
|
||||||
* @param botDifficulty dropdown difficulty
|
|
||||||
* @returns bot difficulty
|
|
||||||
*/
|
|
||||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: BotDifficulty): string;
|
|
||||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
export declare class NoteController {
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
import { NotifierHelper } from "../helpers/NotifierHelper";
|
|
||||||
import { NotificationService } from "../services/NotificationService";
|
|
||||||
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
||||||
export declare class NotifierController {
|
|
||||||
protected notifierHelper: NotifierHelper;
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
|
||||||
protected notificationService: NotificationService;
|
|
||||||
protected pollInterval: number;
|
|
||||||
protected timeout: number;
|
|
||||||
constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService);
|
|
||||||
/**
|
|
||||||
* Resolve an array of session notifications.
|
|
||||||
*
|
|
||||||
* If no notifications are currently queued then intermittently check for new notifications until either
|
|
||||||
* one or more appear or when a timeout expires.
|
|
||||||
* If no notifications are available after the timeout, use a default message.
|
|
||||||
*/
|
|
||||||
notifyAsync(sessionID: string): Promise<unknown>;
|
|
||||||
getServer(sessionID: string): string;
|
|
||||||
getChannel(sessionID: string): INotifierChannel;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
export declare class PresetBuildController {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
|
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
export declare class PresetController {
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
|
||||||
initialize(): void;
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
|
||||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
|
||||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
|
||||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
|
||||||
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
|
|
||||||
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
|
|
||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class ProfileController {
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
|
||||||
getMiniProfiles(): IMiniProfile[];
|
|
||||||
getMiniProfile(sessionID: string): any;
|
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
|
||||||
createProfile(info: IProfileCreateRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Generate a player scav object
|
|
||||||
* pmc profile MUST exist first before pscav can be generated
|
|
||||||
* @param sessionID
|
|
||||||
* @returns IPmcData object
|
|
||||||
*/
|
|
||||||
generatePlayerScav(sessionID: string): IPmcData;
|
|
||||||
validateNickname(info: IValidateNicknameRequestData, sessionID: string): string;
|
|
||||||
changeNickname(info: IProfileChangeNicknameRequestData, sessionID: string): string;
|
|
||||||
changeVoice(info: IProfileChangeVoiceRequestData, sessionID: string): void;
|
|
||||||
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
|
||||||
}
|
|
@ -1,111 +0,0 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
|
||||||
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
|
||||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PlayerService } from "../services/PlayerService";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class QuestController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected questConditionHelper: QuestConditionHelper;
|
|
||||||
protected playerService: PlayerService;
|
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected questConfig: IQuestConfig;
|
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* 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[];
|
|
||||||
/**
|
|
||||||
* Is the quest for the opposite side the player is on
|
|
||||||
* @param side player side (usec/bear)
|
|
||||||
* @param questId questId to check
|
|
||||||
*/
|
|
||||||
protected questIsForOtherSide(side: string, questId: string): boolean;
|
|
||||||
/**
|
|
||||||
* Handle the client accepting a quest and starting it
|
|
||||||
* Send starting rewards if any to player and
|
|
||||||
* Send start notification if any to player
|
|
||||||
* @param pmcData Profile to update
|
|
||||||
* @param acceptedQuest Quest accepted
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns client response
|
|
||||||
*/
|
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Look for an accepted quest inside player profile, return matching
|
|
||||||
* @param pmcData Profile to search through
|
|
||||||
* @param acceptedQuest Quest to search for
|
|
||||||
* @returns IRepeatableQuest
|
|
||||||
*/
|
|
||||||
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
|
||||||
/**
|
|
||||||
* Update completed quest in profile
|
|
||||||
* Add newly unlocked quests to profile
|
|
||||||
* Also recalculate thier level due to exp rewards
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body Completed quest request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns ItemEvent client response
|
|
||||||
*/
|
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Send a popup to player on completion of a quest
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param completedQuestId completed quest id
|
|
||||||
* @param questRewards rewards given to player
|
|
||||||
*/
|
|
||||||
protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
|
||||||
/**
|
|
||||||
* Returns a list of quests that should be failed when a quest is completed
|
|
||||||
* @param completedQuestId quest completed id
|
|
||||||
* @returns array of quests
|
|
||||||
*/
|
|
||||||
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
|
||||||
/**
|
|
||||||
* Fail the quests provided
|
|
||||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @param questsToFail quests to fail
|
|
||||||
*/
|
|
||||||
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Increment a backend counter stored value by an amount,
|
|
||||||
* Create counter if it does not exist
|
|
||||||
* @param pmcData Profile to find backend counter in
|
|
||||||
* @param conditionId backend counter id to update
|
|
||||||
* @param questId quest id counter is associated with
|
|
||||||
* @param counterValue value to increment the backend counter with
|
|
||||||
*/
|
|
||||||
protected updateProfileBackendCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void;
|
|
||||||
}
|
|
@ -1,119 +0,0 @@
|
|||||||
import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator";
|
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { RagfairHelper } from "../helpers/RagfairHelper";
|
|
||||||
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
|
||||||
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
|
||||||
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
|
||||||
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
|
||||||
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
|
||||||
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
|
||||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
|
||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
|
||||||
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
/**
|
|
||||||
* Handle RagfairCallback events
|
|
||||||
*/
|
|
||||||
export declare class RagfairController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected ragfairServer: RagfairServer;
|
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected ragfairSellHelper: RagfairSellHelper;
|
|
||||||
protected ragfairTaxHelper: RagfairTaxHelper;
|
|
||||||
protected ragfairSortHelper: RagfairSortHelper;
|
|
||||||
protected ragfairOfferHelper: RagfairOfferHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected ragfairHelper: RagfairHelper;
|
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
|
||||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
|
||||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
|
||||||
/**
|
|
||||||
* Get offers for the client based on type of search being performed
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param itemsToAdd
|
|
||||||
* @param traderAssorts Trader assorts
|
|
||||||
* @param pmcProfile Player profile
|
|
||||||
* @returns array of offers
|
|
||||||
*/
|
|
||||||
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
|
||||||
/**
|
|
||||||
* Get categories for the type of search being performed, linked/required/all
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param offers ragfair offers to get categories for
|
|
||||||
* @returns record with tpls + counts
|
|
||||||
*/
|
|
||||||
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Add Required offers to offers result
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param assorts
|
|
||||||
* @param pmcProfile Player profile
|
|
||||||
* @param result Result object being sent back to client
|
|
||||||
*/
|
|
||||||
protected addRequiredOffersToResult(searchRequest: ISearchRequestData, assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData, result: IGetOffersResult): void;
|
|
||||||
/**
|
|
||||||
* Add index to all offers passed in (0-indexed)
|
|
||||||
* @param offers Offers to add index value to
|
|
||||||
*/
|
|
||||||
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
|
||||||
/**
|
|
||||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
|
||||||
* @param offer flea offer to update
|
|
||||||
*/
|
|
||||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer): void;
|
|
||||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
|
||||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
|
||||||
update(): void;
|
|
||||||
/**
|
|
||||||
* Called when creating an offer on flea, fills values in top right corner
|
|
||||||
* @param getPriceRequest
|
|
||||||
* @returns min/avg/max values for an item based on flea offers available
|
|
||||||
*/
|
|
||||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
|
||||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
|
||||||
getAllFleaPrices(): Record<string, number>;
|
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
|
||||||
import { RepairHelper } from "../helpers/RepairHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
|
||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
|
||||||
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { RepairService } from "../services/RepairService";
|
|
||||||
export declare class RepairController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected repairHelper: RepairHelper;
|
|
||||||
protected repairService: RepairService;
|
|
||||||
protected repairConfig: IRepairConfig;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
|
||||||
/**
|
|
||||||
* Repair with trader
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @returns item event router action
|
|
||||||
*/
|
|
||||||
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Repair with repair kit
|
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
|
||||||
* @returns item event router action
|
|
||||||
*/
|
|
||||||
repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,244 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { Exit } from "../models/eft/common/ILocationBase";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
|
||||||
import { ELocationName } from "../models/enums/ELocationName";
|
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
|
||||||
import { ProbabilityObject, ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export interface IQuestTypePool {
|
|
||||||
types: string[];
|
|
||||||
pool: IQuestPool;
|
|
||||||
}
|
|
||||||
export interface IQuestPool {
|
|
||||||
Exploration: IExplorationPool;
|
|
||||||
Elimination: IEliminationPool;
|
|
||||||
}
|
|
||||||
export interface IExplorationPool {
|
|
||||||
locations: Partial<Record<ELocationName, string[]>>;
|
|
||||||
}
|
|
||||||
export interface IEliminationPool {
|
|
||||||
targets: IEliminationTargetPool;
|
|
||||||
}
|
|
||||||
export interface IEliminationTargetPool {
|
|
||||||
Savage?: ITargetLocation;
|
|
||||||
AnyPmc?: ITargetLocation;
|
|
||||||
bossBully?: ITargetLocation;
|
|
||||||
bossGluhar?: ITargetLocation;
|
|
||||||
bossKilla?: ITargetLocation;
|
|
||||||
bossSanitar?: ITargetLocation;
|
|
||||||
bossTagilla?: ITargetLocation;
|
|
||||||
bossKojaniy?: ITargetLocation;
|
|
||||||
}
|
|
||||||
export interface ITargetLocation {
|
|
||||||
locations: string[];
|
|
||||||
}
|
|
||||||
export declare class RepeatableQuestController {
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected mathUtil: MathUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected objectId: ObjectId;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected questConfig: IQuestConfig;
|
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, 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
|
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
|
||||||
* repeatableQuestObject = {
|
|
||||||
* id: Unique Id,
|
|
||||||
* name: "Daily",
|
|
||||||
* endTime: the time when the quests expire
|
|
||||||
* activeQuests: currently available quests in an array. Each element of quest type format (see assets/database/templates/repeatableQuests.json).
|
|
||||||
* inactiveQuests: the quests which were previously active (required by client to fail them if they are not completed)
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* The method checks if the player level requirement for repeatable quests (e.g. daily lvl5, weekly lvl15) is met and if the previously active quests
|
|
||||||
* are still valid. This ischecked by endTime persisted in profile accordning to the resetTime configured for each repeatable kind (daily, weekly)
|
|
||||||
* in QuestCondig.js
|
|
||||||
*
|
|
||||||
* If the condition is met, new repeatableQuests are created, old quests (which are persisted in the profile.RepeatableQuests[i].activeQuests) are
|
|
||||||
* moved to profile.RepeatableQuests[i].inactiveQuests. This memory is required to get rid of old repeatable quest data in the profile, otherwise
|
|
||||||
* they'll litter the profile's Quests field.
|
|
||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param {string} sessionId Player's session id
|
|
||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
|
||||||
*/
|
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
|
||||||
/**
|
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
|
||||||
* @param repeatableConfig daily/weekly config
|
|
||||||
* @param pmcData Profile to search
|
|
||||||
* @returns IPmcDataRepeatableQuest
|
|
||||||
*/
|
|
||||||
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest;
|
|
||||||
/**
|
|
||||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
|
||||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
|
||||||
*/
|
|
||||||
generateRepeatableQuest(pmcLevel: number, pmcTraderInfo: Record<string, TraderInfo>, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
|
||||||
/**
|
|
||||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
|
||||||
*/
|
|
||||||
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
|
|
||||||
/**
|
|
||||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
|
||||||
* The templates include Elimination, Completion and Extraction quest types
|
|
||||||
*
|
|
||||||
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
|
||||||
* @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): IRepeatableQuest;
|
|
||||||
/**
|
|
||||||
* Generates a valid Exploration quest
|
|
||||||
*
|
|
||||||
* @param {integer} pmcLevel player's level for reward generation
|
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
|
||||||
* @param {object} questTypePool Pools for quests (used to avoid redundant quests)
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* Generates a valid Completion quest
|
|
||||||
*
|
|
||||||
* @param {integer} pmcLevel player's level for requested items and reward generation
|
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* Generates a valid Elimination quest
|
|
||||||
*
|
|
||||||
* @param {integer} pmcLevel player's level for requested items and reward generation
|
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
|
||||||
* @param {object} questTypePool Pools for quests (used to avoid redundant quests)
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* Exploration repeatable quests can specify a required extraction point.
|
|
||||||
* This method creates the according object which will be appended to the conditions array
|
|
||||||
*
|
|
||||||
* @param {string} exit The exit name to generate the condition for
|
|
||||||
* @returns {object} Exit condition
|
|
||||||
*/
|
|
||||||
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)
|
|
||||||
*
|
|
||||||
* @param {string} targetItemId id of the item to request
|
|
||||||
* @param {integer} value amount of items of this specific type to request
|
|
||||||
* @returns {object} object of "Completion"-condition
|
|
||||||
*/
|
|
||||||
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.
|
|
||||||
*
|
|
||||||
* @param {string} location the location on which to fulfill the elimination quest
|
|
||||||
* @returns {object} object of "Elimination"-location-subcondition
|
|
||||||
*/
|
|
||||||
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.
|
|
||||||
*
|
|
||||||
* @param {string} target array of target npcs e.g. "AnyPmc", "Savage"
|
|
||||||
* @param {array} bodyParts array of body parts with which to kill e.g. ["stomach", "thorax"]
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
* where you have to e.g. kill scavs in same locations.
|
|
||||||
*
|
|
||||||
* @returns {object} the quest pool
|
|
||||||
*/
|
|
||||||
generateQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool;
|
|
||||||
/**
|
|
||||||
* Generate the reward for a mission. A reward can consist of
|
|
||||||
* - Experience
|
|
||||||
* - Money
|
|
||||||
* - Items
|
|
||||||
* - Trader Reputation
|
|
||||||
*
|
|
||||||
* The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to
|
|
||||||
* experience / money / items / trader reputation can be defined in QuestConfig.js
|
|
||||||
*
|
|
||||||
* There's also a random variation of the reward the spread of which can be also defined in the config.
|
|
||||||
*
|
|
||||||
* Additonaly, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used
|
|
||||||
*
|
|
||||||
* @param {integer} pmcLevel player's level
|
|
||||||
* @param {number} difficulty a reward scaling factor goint from 0.2 to 1
|
|
||||||
* @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader)
|
|
||||||
* @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;
|
|
||||||
/**
|
|
||||||
* Helper to create a reward item structured as required by the client
|
|
||||||
*
|
|
||||||
* @param {string} tpl itemId of the rewarded item
|
|
||||||
* @param {integer} value amount of items to give
|
|
||||||
* @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;
|
|
||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
|
||||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
|
||||||
changeRepeatableQuest(pmcDataIn: 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)
|
|
||||||
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
|
||||||
*/
|
|
||||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
|
||||||
/**
|
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
|
||||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
|
||||||
* @param {*} tpl template id of item to check
|
|
||||||
* @returns boolean: true if item is valid reward
|
|
||||||
*/
|
|
||||||
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TradeHelper } from "../helpers/TradeHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { Upd } from "../models/eft/common/tables/IItem";
|
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
declare class TradeController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected tradeHelper: TradeHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected ragfairServer: RagfairServer;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
|
|
||||||
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
||||||
export { TradeController };
|
|
@ -1,46 +0,0 @@
|
|||||||
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class TraderController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected traderAssortHelper: TraderAssortHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected traderAssortService: TraderAssortService;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
|
||||||
/**
|
|
||||||
* Runs when onLoad event is fired
|
|
||||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
|
||||||
* Store timestamp of next assort refresh in nextResupply property of traders .base object
|
|
||||||
*/
|
|
||||||
load(): void;
|
|
||||||
/**
|
|
||||||
* Runs when onUpdate is fired
|
|
||||||
* If current time is > nextResupply(expire) time of trader, refresh traders assorts and
|
|
||||||
* Fence is handled slightly differently
|
|
||||||
* @returns has run
|
|
||||||
*/
|
|
||||||
update(): boolean;
|
|
||||||
/**
|
|
||||||
* Return an array of all traders
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns array if ITraderBase objects
|
|
||||||
*/
|
|
||||||
getAllTraders(sessionID: string): ITraderBase[];
|
|
||||||
getTrader(sessionID: string, traderID: string): ITraderBase;
|
|
||||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
|
||||||
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
export declare class WeatherController {
|
|
||||||
protected weatherGenerator: WeatherGenerator;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected weatherConfig: IWeatherConfig;
|
|
||||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
|
||||||
generate(): IWeatherData;
|
|
||||||
/**
|
|
||||||
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
|
||||||
* @returns Date object
|
|
||||||
*/
|
|
||||||
getCurrentInRaidTime(): Date;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
export declare class WishlistController {
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
18
Live/CWX_DebugTool/types/di/Container.d.ts
vendored
18
Live/CWX_DebugTool/types/di/Container.d.ts
vendored
@ -1,18 +0,0 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
/**
|
|
||||||
* Handle the registration of classes to be used by the Dependency Injection code
|
|
||||||
*/
|
|
||||||
export declare class Container {
|
|
||||||
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
|
|
||||||
static registerTypes(depContainer: DependencyContainer): void;
|
|
||||||
static registerListTypes(depContainer: DependencyContainer): void;
|
|
||||||
private static registerUtils;
|
|
||||||
private static registerRouters;
|
|
||||||
private static registerGenerators;
|
|
||||||
private static registerHelpers;
|
|
||||||
private static registerLoaders;
|
|
||||||
private static registerCallbacks;
|
|
||||||
private static registerServices;
|
|
||||||
private static registerServers;
|
|
||||||
private static registerControllers;
|
|
||||||
}
|
|
4
Live/CWX_DebugTool/types/di/OnLoad.d.ts
vendored
4
Live/CWX_DebugTool/types/di/OnLoad.d.ts
vendored
@ -1,4 +0,0 @@
|
|||||||
export declare class OnLoad {
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
import { OnLoad } from "./OnLoad";
|
|
||||||
import { OnUpdate } from "./OnUpdate";
|
|
||||||
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
onLoad(): Promise<void>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
4
Live/CWX_DebugTool/types/di/OnUpdate.d.ts
vendored
4
Live/CWX_DebugTool/types/di/OnUpdate.d.ts
vendored
@ -1,4 +0,0 @@
|
|||||||
export declare class OnUpdate {
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
40
Live/CWX_DebugTool/types/di/Router.d.ts
vendored
40
Live/CWX_DebugTool/types/di/Router.d.ts
vendored
@ -1,40 +0,0 @@
|
|||||||
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;
|
|
||||||
getTopLevelRoute(): string;
|
|
||||||
protected getHandledRoutes(): HandledRoute[];
|
|
||||||
private getInternalHandledRoutes;
|
|
||||||
canHandle(url: string, partialMatch?: boolean): boolean;
|
|
||||||
}
|
|
||||||
export declare class StaticRouter extends Router {
|
|
||||||
private routes;
|
|
||||||
constructor(routes: RouteAction[]);
|
|
||||||
handleStatic(url: string, info: any, sessionID: string, output: string): any;
|
|
||||||
getHandledRoutes(): HandledRoute[];
|
|
||||||
}
|
|
||||||
export declare class DynamicRouter extends Router {
|
|
||||||
private routes;
|
|
||||||
constructor(routes: RouteAction[]);
|
|
||||||
handleDynamic(url: string, info: any, sessionID: string, output: string): any;
|
|
||||||
getHandledRoutes(): HandledRoute[];
|
|
||||||
}
|
|
||||||
export declare class ItemEventRouterDefinition extends Router {
|
|
||||||
constructor();
|
|
||||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
||||||
export declare class SaveLoadRouter extends Router {
|
|
||||||
constructor();
|
|
||||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
|
||||||
}
|
|
||||||
export declare class HandledRoute {
|
|
||||||
route: string;
|
|
||||||
dynamic: boolean;
|
|
||||||
constructor(route: string, dynamic: boolean);
|
|
||||||
}
|
|
||||||
export declare class RouteAction {
|
|
||||||
url: string;
|
|
||||||
action: (url: string, info: any, sessionID: string, output: string) => any;
|
|
||||||
constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any);
|
|
||||||
}
|
|
6
Live/CWX_DebugTool/types/di/Serializer.d.ts
vendored
6
Live/CWX_DebugTool/types/di/Serializer.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
import { IncomingMessage, ServerResponse } from "http";
|
|
||||||
export declare class Serializer {
|
|
||||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
|
||||||
canHandle(something: string): boolean;
|
|
||||||
}
|
|
@ -1,181 +0,0 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ProbabilityHelper } from "../helpers/ProbabilityHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
|
||||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
|
||||||
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class BotEquipmentModGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected probabilityHelper: ProbabilityHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Check mods are compatible and add to array
|
|
||||||
* @param equipment Equipment item to add mods to
|
|
||||||
* @param modPool Mod list to choose frm
|
|
||||||
* @param parentId parentid of item to add mod to
|
|
||||||
* @param parentTemplate template objet of item to add mods to
|
|
||||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
|
||||||
* @param botRole the bot role being generated for
|
|
||||||
* @param forceSpawn should this mod be forced to spawn
|
|
||||||
* @returns Item + compatible mods as an array
|
|
||||||
*/
|
|
||||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
|
||||||
/**
|
|
||||||
* Add mods to a weapon using the provided mod pool
|
|
||||||
* @param sessionId session id
|
|
||||||
* @param weapon Weapon to add mods to
|
|
||||||
* @param modPool Pool of compatible mods to attach to weapon
|
|
||||||
* @param weaponParentId parentId of weapon
|
|
||||||
* @param parentWeaponTemplate Weapon which mods will be generated on
|
|
||||||
* @param modSpawnChances Mod spawn chances
|
|
||||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
|
||||||
* @param botRole Role of bot weapon is generated for
|
|
||||||
* @param botLevel lvel of the bot weapon is being generated for
|
|
||||||
* @param modLimits limits placed on certian mod types per gun
|
|
||||||
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
|
||||||
* @returns Weapon + mods array
|
|
||||||
*/
|
|
||||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentWeaponTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
|
||||||
/**
|
|
||||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
|
||||||
* @param modSlot e.g patron_in_weapon
|
|
||||||
* @param parentTemplate item template
|
|
||||||
* @returns Slot item
|
|
||||||
*/
|
|
||||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
|
||||||
/**
|
|
||||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
|
||||||
* never return true for an item that has 0% spawn chance
|
|
||||||
* @param itemSlot slot the item sits in
|
|
||||||
* @param modSlot slot the mod sits in
|
|
||||||
* @param modSpawnChances Chances for various mod spawns
|
|
||||||
* @returns boolean true if it should spawn
|
|
||||||
*/
|
|
||||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param modSlot Slot mod will fit into
|
|
||||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
|
||||||
* @param modsParent Parent slot the item will be a part of
|
|
||||||
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
|
||||||
* @param itemModPool Pool of items to pick from
|
|
||||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
|
||||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
|
||||||
* @param parentTemplate Parent item the mod will go into
|
|
||||||
* @returns ITemplateItem
|
|
||||||
*/
|
|
||||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
|
||||||
/**
|
|
||||||
* Create a mod item with parameters as properties
|
|
||||||
* @param modId _id
|
|
||||||
* @param modTpl _tpl
|
|
||||||
* @param parentId parentId
|
|
||||||
* @param modSlot slotId
|
|
||||||
* @param modTemplate Used to add additional properites in the upd object
|
|
||||||
* @returns Item object
|
|
||||||
*/
|
|
||||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
|
||||||
/**
|
|
||||||
* Get a list of containers that hold ammo
|
|
||||||
* e.g. mod_magazine / patron_in_weapon_000
|
|
||||||
* @returns string array
|
|
||||||
*/
|
|
||||||
protected getAmmoContainers(): string[];
|
|
||||||
/**
|
|
||||||
* Get a random mod from an items compatible mods Filter array
|
|
||||||
* @param modTpl ???? default value to return if nothing found
|
|
||||||
* @param parentSlot item mod will go into, used to get combatible items
|
|
||||||
* @param modSlot Slot to get mod to fill
|
|
||||||
* @param items items to ensure picked mod is compatible with
|
|
||||||
* @returns item tpl
|
|
||||||
*/
|
|
||||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
|
||||||
/**
|
|
||||||
* Log errors if mod is not compatible with slot
|
|
||||||
* @param modToAdd template of mod to check
|
|
||||||
* @param itemSlot slot the item will be placed in
|
|
||||||
* @param modSlot slot the mod will fill
|
|
||||||
* @param parentTemplate tempalte of the mods parent item
|
|
||||||
* @returns true if valid
|
|
||||||
*/
|
|
||||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
|
||||||
/**
|
|
||||||
* Find mod tpls of a provided type and add to modPool
|
|
||||||
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
|
||||||
* @param modTemplate db object for modItem we get compatible mods from
|
|
||||||
* @param modPool Pool of mods we are adding to
|
|
||||||
*/
|
|
||||||
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
|
||||||
/**
|
|
||||||
* Get the possible items that fit a slot
|
|
||||||
* @param parentItemId item tpl to get compatible items for
|
|
||||||
* @param modSlot Slot item should fit in
|
|
||||||
* @param botEquipBlacklist equipment that should not be picked
|
|
||||||
* @returns array of compatible items for that slot
|
|
||||||
*/
|
|
||||||
protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[];
|
|
||||||
/**
|
|
||||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
|
||||||
* @param allowedMods base mods to filter
|
|
||||||
* @param botEquipBlacklist equipment blacklist
|
|
||||||
* @param modSlot slot mods belong to
|
|
||||||
* @returns Filtered array of mod tpls
|
|
||||||
*/
|
|
||||||
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
|
||||||
/**
|
|
||||||
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
|
||||||
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
|
||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
|
||||||
* @param modPool modPool which should include available cartrigdes
|
|
||||||
* @param parentId The CylinderMagazine's UID
|
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
|
||||||
*/
|
|
||||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
|
||||||
/**
|
|
||||||
* Take a record of camoras and merge the compatable shells into one array
|
|
||||||
* @param camorasWithShells camoras we want to merge into one array
|
|
||||||
* @returns string array of shells fro luitple camora sources
|
|
||||||
*/
|
|
||||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
|
||||||
/**
|
|
||||||
* Filter out non-whitelisted weapon scopes
|
|
||||||
* @param weapon Weapon scopes will be added to
|
|
||||||
* @param scopes Full scope pool
|
|
||||||
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
|
||||||
* @returns array of scope tpls that have been filtered
|
|
||||||
*/
|
|
||||||
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
|
||||||
import { BotLevelGenerator } from "./BotLevelGenerator";
|
|
||||||
export declare class BotGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected botInventoryGenerator: BotInventoryGenerator;
|
|
||||||
protected botLevelGenerator: BotLevelGenerator;
|
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
|
||||||
protected seasonalEventService: SeasonalEventService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Generate a player scav bot object
|
|
||||||
* @param role e.g. assault / pmcbot
|
|
||||||
* @param difficulty easy/normal/hard/impossible
|
|
||||||
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
|
||||||
/**
|
|
||||||
* Create x number of bots of the type/side/difficulty defined in botGenerationDetails
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param botGenerationDetails details on how to generate bots
|
|
||||||
* @returns array of bots
|
|
||||||
*/
|
|
||||||
prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
|
||||||
/**
|
|
||||||
* Get a clone of the database\bots\base.json file
|
|
||||||
* @returns IBotBase object
|
|
||||||
*/
|
|
||||||
protected getCloneOfBotBase(): IBotBase;
|
|
||||||
/**
|
|
||||||
* Create a IBotBase object with equipment/loot/exp etc
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param bot bots base file
|
|
||||||
* @param botJsonTemplate Bot template from db/bots/x.json
|
|
||||||
* @param botGenerationDetails details on how to generate the bot
|
|
||||||
* @returns IBotBase object
|
|
||||||
*/
|
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
|
||||||
/**
|
|
||||||
* Create a bot nickname
|
|
||||||
* @param botJsonTemplate x.json from database
|
|
||||||
* @param isPlayerScav Will bot be player scav
|
|
||||||
* @param botRole role of bot e.g. assault
|
|
||||||
* @returns Nickname for bot
|
|
||||||
*/
|
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string): string;
|
|
||||||
/**
|
|
||||||
* Log the number of PMCs generated to the debug console
|
|
||||||
* @param output Generated bot array, ready to send to client
|
|
||||||
*/
|
|
||||||
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
|
||||||
/**
|
|
||||||
* Converts health object to the required format
|
|
||||||
* @param healthObj health object from bot json
|
|
||||||
* @param playerScav Is a pscav bot being generated
|
|
||||||
* @returns PmcHealth object
|
|
||||||
*/
|
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
|
||||||
/**
|
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
|
||||||
* @param bot bot to update
|
|
||||||
* @returns updated IBotBase object
|
|
||||||
*/
|
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
|
||||||
/**
|
|
||||||
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
|
||||||
* @param bot bot to add dogtag to
|
|
||||||
* @returns Bot with dogtag added
|
|
||||||
*/
|
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
|
||||||
import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
|
||||||
import { BotLootGenerator } from "./BotLootGenerator";
|
|
||||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
|
||||||
export declare class BotInventoryGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
|
||||||
protected botLootGenerator: BotLootGenerator;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
|
||||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Add equipment/weapons/loot to bot
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param botJsonTemplate bot/x.json data from db
|
|
||||||
* @param botRole Role bot has (assault/pmcBot)
|
|
||||||
* @param isPmc Is bot being converted into a pmc
|
|
||||||
* @param botLevel Level of bot being generated
|
|
||||||
* @returns PmcInventory object with equipment/weapons/loot
|
|
||||||
*/
|
|
||||||
generateInventory(sessionId: string, botJsonTemplate: IBotType, botRole: string, isPmc: boolean, botLevel: number): PmcInventory;
|
|
||||||
/**
|
|
||||||
* Create a pmcInventory object with all the base/generic items needed
|
|
||||||
* @returns PmcInventory object
|
|
||||||
*/
|
|
||||||
protected generateInventoryBase(): PmcInventory;
|
|
||||||
/**
|
|
||||||
* Add equipment to a bot
|
|
||||||
* @param templateInventory bot/x.json data from db
|
|
||||||
* @param equipmentChances Chances items will be added to bot
|
|
||||||
* @param botRole Role bot has (assault/pmcBot)
|
|
||||||
* @param botInventory Inventory to add equipment to
|
|
||||||
* @param botLevel Level of bot
|
|
||||||
*/
|
|
||||||
protected generateAndAddEquipmentToBot(templateInventory: Inventory, equipmentChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
|
||||||
/**
|
|
||||||
* Add a piece of equipment with mods to inventory from the provided pools
|
|
||||||
* @param equipmentSlot Slot to select an item for
|
|
||||||
* @param equipmentPool Possible items to choose from
|
|
||||||
* @param modPool Possible mods to apply to item chosen
|
|
||||||
* @param spawnChances Chances items will be chosen to be added
|
|
||||||
* @param botRole Role of bot e.g. assault
|
|
||||||
* @param inventory Inventory to add item into
|
|
||||||
* @param randomisationDetails settings from bot.json to adjust how item is generated
|
|
||||||
*/
|
|
||||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void;
|
|
||||||
/**
|
|
||||||
* Get all possible mods for item and filter down based on equipment blacklist from bot.json config
|
|
||||||
* @param itemTpl Item mod pool is being retreived and filtered
|
|
||||||
* @param equipmentBlacklist blacklist to filter mod pool with
|
|
||||||
* @returns Filtered pool of mods
|
|
||||||
*/
|
|
||||||
protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record<string, string[]>;
|
|
||||||
/**
|
|
||||||
* Work out what weapons bot should have equipped and add them to bot inventory
|
|
||||||
* @param templateInventory bot/x.json data from db
|
|
||||||
* @param equipmentChances Chances bot can have equipment equipped
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param botInventory Inventory to add weapons to
|
|
||||||
* @param botRole assault/pmcBot/bossTagilla etc
|
|
||||||
* @param isPmc Is the bot being generated as a pmc
|
|
||||||
* @param botLevel level of bot having weapon generated
|
|
||||||
* @param itemGenerationLimitsMinMax Limits for items the bot can have
|
|
||||||
*/
|
|
||||||
protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void;
|
|
||||||
/**
|
|
||||||
* Calculate if the bot should have weapons in Primary/Secondary/Holster slots
|
|
||||||
* @param equipmentChances Chances bot has certain equipment
|
|
||||||
* @returns What slots bot should have weapons generated for
|
|
||||||
*/
|
|
||||||
protected getDesiredWeaponsForBot(equipmentChances: Chances): {
|
|
||||||
slot: EquipmentSlots;
|
|
||||||
shouldSpawn: boolean;
|
|
||||||
}[];
|
|
||||||
/**
|
|
||||||
* Add weapon + spare mags/ammo to bots inventory
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param weaponSlot Weapon slot being generated
|
|
||||||
* @param templateInventory bot/x.json data from db
|
|
||||||
* @param botInventory Inventory to add weapon+mags/ammo to
|
|
||||||
* @param equipmentChances Chances bot can have equipment equipped
|
|
||||||
* @param botRole assault/pmcBot/bossTagilla etc
|
|
||||||
* @param isPmc Is the bot being generated as a pmc
|
|
||||||
* @param itemGenerationLimitsMinMax
|
|
||||||
*/
|
|
||||||
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
|
||||||
slot: EquipmentSlots;
|
|
||||||
shouldSpawn: boolean;
|
|
||||||
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void;
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
import { IRandomisedBotLevelResult } from "../models/eft/bot/IRandomisedBotLevelResult";
|
|
||||||
import { ExpTable } 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";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class BotLevelGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer);
|
|
||||||
/**
|
|
||||||
* Return a randomised bot level and exp value
|
|
||||||
* @param levelDetails min and max of level for bot
|
|
||||||
* @param botGenerationDetails Deatils to help generate a bot
|
|
||||||
* @param bot being level is being generated for
|
|
||||||
* @returns IRandomisedBotLevelResult object
|
|
||||||
*/
|
|
||||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
|
||||||
/**
|
|
||||||
* Get the highest level a bot can be relative to the players level, but no futher than the max size from globals.exp_table
|
|
||||||
* @param playerLevel Players current level
|
|
||||||
* @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;
|
|
||||||
}
|
|
@ -1,139 +0,0 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
|
||||||
export declare class BotLootGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
|
||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected botLootCacheService: BotLootCacheService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Add loot to bots containers
|
|
||||||
* @param sessionId Session id
|
|
||||||
* @param templateInventory x.json from database/bots
|
|
||||||
* @param itemCounts Liits on item types to be added as loot
|
|
||||||
* @param isPmc Will bot be a pmc
|
|
||||||
* @param botRole Role of bot, e.g. asssult
|
|
||||||
* @param botInventory Inventory to add loot to
|
|
||||||
* @param equipmentChances
|
|
||||||
* @param botLevel Level of bot
|
|
||||||
*/
|
|
||||||
generateLoot(sessionId: string, templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances, botLevel: number): 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
|
|
||||||
* @param pool pool of items to pick from
|
|
||||||
* @param equipmentSlots What equality slot will the loot items be added to
|
|
||||||
* @param totalItemCount Max count of items to add
|
|
||||||
* @param inventoryToAddItemsTo bot inventory loot will be added to
|
|
||||||
* @param botRole role of the bot loot is being generated for (assault/pmcbot)
|
|
||||||
* @param useLimits should item limit counts be used as defined in config/bot.json
|
|
||||||
* @param totalValueLimitRub total value of loot allowed in roubles
|
|
||||||
* @param isPmc is the bot being generated for a pmc
|
|
||||||
*/
|
|
||||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
|
||||||
/**
|
|
||||||
* Add generated weapons to inventory as loot
|
|
||||||
* @param botInventory inventory to add preset to
|
|
||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
|
||||||
* @param templateInventory bots template, assault.json
|
|
||||||
* @param modChances chances for mods to spawn on weapon
|
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
|
||||||
* @param isPmc are we generating for a pmc
|
|
||||||
*/
|
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
|
||||||
/**
|
|
||||||
* 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 getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
|
||||||
/**
|
|
||||||
* Get the loot nvalue from botconfig
|
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
|
||||||
* @returns nvalue as number
|
|
||||||
*/
|
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
|
||||||
/**
|
|
||||||
* Update item limit array to contain items that have a limit
|
|
||||||
* All values are set to 0
|
|
||||||
* @param isPmc is the bot a pmc
|
|
||||||
* @param botRole role the bot has
|
|
||||||
* @param limitCount
|
|
||||||
*/
|
|
||||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
|
||||||
/**
|
|
||||||
* Check if an item has reached its bot-specific spawn limit
|
|
||||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
|
||||||
* @param botRole Bot type
|
|
||||||
* @param isPmc Is bot we're working with a pmc
|
|
||||||
* @param limitCount spawn limits for items on bot
|
|
||||||
* @param itemSpawnLimits the limits this bot is allowed to have
|
|
||||||
* @returns true if item has reached spawn limit
|
|
||||||
*/
|
|
||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
|
||||||
/**
|
|
||||||
* Is the item an ammo box
|
|
||||||
* @param props props of the item to check
|
|
||||||
* @returns true if item is an ammo box
|
|
||||||
*/
|
|
||||||
protected isAmmoBox(props: Props): boolean;
|
|
||||||
/**
|
|
||||||
* Create an object that contains the ammo stack for an ammo box
|
|
||||||
* @param parentId ammo box id
|
|
||||||
* @param props ammo box props
|
|
||||||
* @returns Item object
|
|
||||||
*/
|
|
||||||
protected createAmmoForAmmoBox(parentId: string, props: Props): Item;
|
|
||||||
/**
|
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
|
||||||
* @param isPmc is this a PMC
|
|
||||||
* @param itemTemplate item details
|
|
||||||
* @param moneyItem Money stack to randomise
|
|
||||||
*/
|
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
|
||||||
/**
|
|
||||||
* Randomise the size of an ammo stack
|
|
||||||
* @param isPmc is this a PMC
|
|
||||||
* @param itemTemplate item details
|
|
||||||
* @param ammoItem Ammo stack to randomise
|
|
||||||
*/
|
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
|
||||||
/**
|
|
||||||
* Get spawn limits for a specific bot type from bot.json config
|
|
||||||
* If no limit found for a non pmc bot, fall back to defaults
|
|
||||||
* @param isPmc is the bot we want limits for a pmc
|
|
||||||
* @param botRole what role does the bot have
|
|
||||||
* @returns Dictionary of tplIds and limit
|
|
||||||
*/
|
|
||||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
|
||||||
* @param itemTemplate item we want to look for in spawn limits
|
|
||||||
* @param spawnLimits Limits to check for item
|
|
||||||
* @returns id as string, otherwise undefined
|
|
||||||
*/
|
|
||||||
protected getMatchingIdFromSpawnLimits(itemTemplate: ITemplateItem, spawnLimits: Record<string, number>): string;
|
|
||||||
}
|
|
@ -1,155 +0,0 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
|
||||||
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
|
||||||
export declare class BotWeaponGenerator {
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
|
||||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
|
||||||
protected readonly modMagazineSlotId = "mod_magazine";
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
|
||||||
/**
|
|
||||||
* Pick a random weapon based on weightings and generate a functional weapon
|
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
|
||||||
* @param botTemplateInventory e.g. assault.json
|
|
||||||
* @param weaponParentId
|
|
||||||
* @param modChances
|
|
||||||
* @param botRole role of bot, e.g. assault/followerBully
|
|
||||||
* @param isPmc Is weapon generated for a pmc
|
|
||||||
* @returns GenerateWeaponResult object
|
|
||||||
*/
|
|
||||||
generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
|
||||||
/**
|
|
||||||
* Get a random weighted weapon from a bots pool of weapons
|
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
|
||||||
* @param botTemplateInventory e.g. assault.json
|
|
||||||
* @returns weapon tpl
|
|
||||||
*/
|
|
||||||
pickWeightedWeaponTplFromPool(equipmentSlot: string, botTemplateInventory: Inventory): string;
|
|
||||||
/**
|
|
||||||
* Generated a weapon based on the supplied weapon tpl
|
|
||||||
* @param weaponTpl weapon tpl to generate (use pickWeightedWeaponTplFromPool())
|
|
||||||
* @param equipmentSlot slot to fit into, primary/secondary/holster
|
|
||||||
* @param botTemplateInventory e.g. assault.json
|
|
||||||
* @param weaponParentId ParentId of the weapon being generated
|
|
||||||
* @param modChances Dictionary of item types and % chance weapon will have that mod
|
|
||||||
* @param botRole e.g. assault/exusec
|
|
||||||
* @param isPmc
|
|
||||||
* @returns GenerateWeaponResult object
|
|
||||||
*/
|
|
||||||
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
|
||||||
/**
|
|
||||||
* Create array with weapon base as only element and
|
|
||||||
* add additional properties based on weapon type
|
|
||||||
* @param weaponTpl Weapon tpl to create item with
|
|
||||||
* @param weaponParentId Weapons parent id
|
|
||||||
* @param equipmentSlot e.g. primary/secondary/holster
|
|
||||||
* @param weaponItemTemplate db template for weapon
|
|
||||||
* @param botRole for durability values
|
|
||||||
* @returns Base weapon item in array
|
|
||||||
*/
|
|
||||||
protected constructWeaponBaseArray(weaponTpl: string, weaponParentId: string, equipmentSlot: string, weaponItemTemplate: ITemplateItem, botRole: string): Item[];
|
|
||||||
/**
|
|
||||||
* Get the mods necessary to kit out a weapon to its preset level
|
|
||||||
* @param weaponTpl weapon to find preset for
|
|
||||||
* @param equipmentSlot the slot the weapon will be placed in
|
|
||||||
* @param weaponParentId Value used for the parentid
|
|
||||||
* @returns array of weapon mods
|
|
||||||
*/
|
|
||||||
protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[];
|
|
||||||
/**
|
|
||||||
* Checks if all required slots are occupied on a weapon and all it's mods
|
|
||||||
* @param weaponItemArray Weapon + mods
|
|
||||||
* @returns true if valid
|
|
||||||
*/
|
|
||||||
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
|
||||||
/**
|
|
||||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
|
||||||
* Additionally, adds extra bullets to SecuredContainer
|
|
||||||
* @param generatedWeaponResult object with properties for generated weapon (weapon mods pool / weapon template / ammo tpl)
|
|
||||||
* @param magCounts Magazine count to add to inventory
|
|
||||||
* @param inventory Inventory to add magazines to
|
|
||||||
* @param botRole The bot type we're getting generating extra mags for
|
|
||||||
*/
|
|
||||||
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
|
||||||
/**
|
|
||||||
* Add ammo to the secure container
|
|
||||||
* @param stackCount How many stacks of ammo to add
|
|
||||||
* @param ammoTpl Ammo type to add
|
|
||||||
* @param stackSize Size of the ammo stack to add
|
|
||||||
* @param inventory Player inventory
|
|
||||||
*/
|
|
||||||
protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void;
|
|
||||||
/**
|
|
||||||
* Get a weapons magazine tpl from a weapon template
|
|
||||||
* @param weaponMods mods from a weapon template
|
|
||||||
* @param weaponTemplate Weapon to get magazine tpl for
|
|
||||||
* @param botRole the bot type we are getting the magazine for
|
|
||||||
* @returns magazine tpl string
|
|
||||||
*/
|
|
||||||
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem, botRole: string): string;
|
|
||||||
/**
|
|
||||||
* Finds and return a compatible ammo tpl based on the bots ammo weightings (x.json/inventory/equipment/ammo)
|
|
||||||
* @param ammo a list of ammo tpls the weapon can use
|
|
||||||
* @param weaponTemplate the weapon we want to pick ammo for
|
|
||||||
* @returns an ammo tpl that works with the desired gun
|
|
||||||
*/
|
|
||||||
protected getWeightedCompatibleAmmo(ammo: Record<string, Record<string, number>>, weaponTemplate: ITemplateItem): string;
|
|
||||||
/**
|
|
||||||
* Get a weapons compatible cartridge caliber
|
|
||||||
* @param weaponTemplate Weapon to look up caliber of
|
|
||||||
* @returns caliber as string
|
|
||||||
*/
|
|
||||||
protected getWeaponCaliber(weaponTemplate: ITemplateItem): string;
|
|
||||||
/**
|
|
||||||
* Fill existing magazines to full, while replacing their contents with specified ammo
|
|
||||||
* @param weaponMods
|
|
||||||
* @param magazine
|
|
||||||
* @param ammoTpl
|
|
||||||
*/
|
|
||||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
|
||||||
/**
|
|
||||||
* Add cartridge item to weapon Item array, if it already exists, update
|
|
||||||
* @param weaponMods Weapon items array to amend
|
|
||||||
* @param magazine magazine item details we're adding cartridges to
|
|
||||||
* @param chosenAmmo cartridge to put into the magazine
|
|
||||||
* @param newStackSize how many cartridges should go into the magazine
|
|
||||||
*/
|
|
||||||
protected addOrUpdateMagazinesChildWithAmmo(weaponMods: Item[], magazine: Item, chosenAmmo: string, newStackSize: number): void;
|
|
||||||
/**
|
|
||||||
* Fill each Camora with a bullet
|
|
||||||
* @param weaponMods Weapon mods to find and update camora mod(s) from
|
|
||||||
* @param magazineId magazine id to find and add to
|
|
||||||
* @param ammoTpl ammo template id to hydate with
|
|
||||||
*/
|
|
||||||
protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
export declare class FenceBaseAssortGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected traderConfig: ITraderConfig;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Create base fence assorts dynamically and store in db
|
|
||||||
*/
|
|
||||||
generateFenceBaseAssorts(): void;
|
|
||||||
/**
|
|
||||||
* Check if item is valid for being added to fence assorts
|
|
||||||
* @param item Item to check
|
|
||||||
* @returns true if valid fence item
|
|
||||||
*/
|
|
||||||
protected isValidFenceItem(item: ITemplateItem): boolean;
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
import { ContainerHelper } from "../helpers/ContainerHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
|
||||||
import { ILooseLoot, SpawnpointsForced, SpawnpointTemplate } 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";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
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";
|
|
||||||
export interface IContainerItem {
|
|
||||||
items: Item[];
|
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
}
|
|
||||||
export declare class LocationGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected objectId: ObjectId;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected mathUtil: MathUtil;
|
|
||||||
protected seasonalEventService: SeasonalEventService;
|
|
||||||
protected containerHelper: ContainerHelper;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
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);
|
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
|
||||||
/**
|
|
||||||
* Create array of loose + forced loot using probability system
|
|
||||||
* @param dynamicLootDist
|
|
||||||
* @param staticAmmoDist
|
|
||||||
* @param locationName Location to generate loot for
|
|
||||||
* @returns Array of spawn points with loot in them
|
|
||||||
*/
|
|
||||||
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
|
|
||||||
/**
|
|
||||||
* Add forced spawn point loot into loot parameter array
|
|
||||||
* @param loot array to add forced loot to
|
|
||||||
* @param forcedSpawnPoints forced loot to add
|
|
||||||
*/
|
|
||||||
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[]): void;
|
|
||||||
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class LootGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
|
||||||
/**
|
|
||||||
* Generate a list of items based on configuration options parameter
|
|
||||||
* @param options parameters to adjust how loot is generated
|
|
||||||
* @returns An array of loot items
|
|
||||||
*/
|
|
||||||
createRandomloot(options: LootRequest): LootItem[];
|
|
||||||
/**
|
|
||||||
* Construct item limit record to hold max and current item count
|
|
||||||
* @param limits limits as defined in config
|
|
||||||
* @returns record, key: item tplId, value: current/max item count allowed
|
|
||||||
*/
|
|
||||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
|
|
||||||
current: number;
|
|
||||||
max: number;
|
|
||||||
}>;
|
|
||||||
/**
|
|
||||||
* Find a random item in items.json and add to result array
|
|
||||||
* @param items items to choose from
|
|
||||||
* @param itemTypeCounts item limit counts
|
|
||||||
* @param options item filters
|
|
||||||
* @param result array to add found item to
|
|
||||||
* @returns true if item was valid and added to pool
|
|
||||||
*/
|
|
||||||
protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record<string, {
|
|
||||||
current: number;
|
|
||||||
max: number;
|
|
||||||
}>, options: LootRequest, result: LootItem[]): boolean;
|
|
||||||
/**
|
|
||||||
* Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values
|
|
||||||
* @param item item to get stack count of
|
|
||||||
* @param options loot options
|
|
||||||
* @returns stack count
|
|
||||||
*/
|
|
||||||
protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number;
|
|
||||||
/**
|
|
||||||
* Find a random item in items.json and add to result array
|
|
||||||
* @param globalDefaultPresets presets to choose from
|
|
||||||
* @param itemTypeCounts item limit counts
|
|
||||||
* @param itemBlacklist items to skip
|
|
||||||
* @param result array to add found preset to
|
|
||||||
* @returns true if preset was valid and added to pool
|
|
||||||
*/
|
|
||||||
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, Preset][], itemTypeCounts: Record<string, {
|
|
||||||
current: number;
|
|
||||||
max: number;
|
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
/**
|
|
||||||
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
|
||||||
* and the removal of blacklisted items
|
|
||||||
*/
|
|
||||||
export declare class PMCLootGenerator {
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected pocketLootPool: string[];
|
|
||||||
protected backpackLootPool: string[];
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService);
|
|
||||||
generatePMCPocketLootPool(): string[];
|
|
||||||
generatePMCBackpackLootPool(): string[];
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { IPlayerScavConfig, KarmaLevel } from "../models/spt/config/IPlayerScavConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { BotGenerator } from "./BotGenerator";
|
|
||||||
export declare class PlayerScavGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected botLootCacheService: BotLootCacheService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botGenerator: BotGenerator;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected playerScavConfig: IPlayerScavConfig;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Update a player profile to include a new player scav profile
|
|
||||||
* @param sessionID session id to specify what profile is updated
|
|
||||||
* @returns profile object
|
|
||||||
*/
|
|
||||||
generate(sessionID: string): IPmcData;
|
|
||||||
/**
|
|
||||||
* Get the scav karama level for a profile
|
|
||||||
* Is also the fence trader rep level
|
|
||||||
* @param pmcData pmc profile
|
|
||||||
* @returns karma level
|
|
||||||
*/
|
|
||||||
protected getScavKarmaLevel(pmcData: IPmcData): number;
|
|
||||||
/**
|
|
||||||
* Get a baseBot template
|
|
||||||
* If the parameter doesnt match "assault", take parts from the loot type and apply to the return bot template
|
|
||||||
* @param botTypeForLoot bot type to use for inventory/chances
|
|
||||||
* @returns IBotType object
|
|
||||||
*/
|
|
||||||
protected constructBotBaseTemplate(botTypeForLoot: string): IBotType;
|
|
||||||
/**
|
|
||||||
* Adjust equipment/mod/item generation values based on scav karma levels
|
|
||||||
* @param karmaSettings Values to modify the bot template with
|
|
||||||
* @param baseBotNode bot template to modify according to karama level settings
|
|
||||||
*/
|
|
||||||
protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void;
|
|
||||||
protected getScavSkills(scavProfile: IPmcData): Skills;
|
|
||||||
protected getDefaultScavSkills(): Skills;
|
|
||||||
protected getScavStats(scavProfile: IPmcData): Stats;
|
|
||||||
protected getScavLevel(scavProfile: IPmcData): number;
|
|
||||||
protected getScavExperience(scavProfile: IPmcData): number;
|
|
||||||
/**
|
|
||||||
* Set cooldown till pscav is playable
|
|
||||||
* take into account scav cooldown bonus
|
|
||||||
* @param scavData scav profile
|
|
||||||
* @param pmcData pmc profile
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected setScavCooldownTimer(scavData: IPmcData, pmcData: IPmcData): IPmcData;
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { Preset } 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";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class RagfairAssortGenerator {
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected generatedAssortItems: Item[];
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Get an array of unique items that can be sold on the flea
|
|
||||||
* @returns array of unique items
|
|
||||||
*/
|
|
||||||
getAssortItems(): Item[];
|
|
||||||
/**
|
|
||||||
* Check internal generatedAssortItems array has objects
|
|
||||||
* @returns true if array has objects
|
|
||||||
*/
|
|
||||||
protected assortsAreGenerated(): boolean;
|
|
||||||
/**
|
|
||||||
* Generate an array of items the flea can sell
|
|
||||||
* @returns array of unique items
|
|
||||||
*/
|
|
||||||
protected generateRagfairAssortItems(): Item[];
|
|
||||||
/**
|
|
||||||
* Get presets from globals.json
|
|
||||||
* @returns Preset object array
|
|
||||||
*/
|
|
||||||
protected getPresets(): Preset[];
|
|
||||||
/**
|
|
||||||
* Get default presets from globals.json
|
|
||||||
* @returns Preset object array
|
|
||||||
*/
|
|
||||||
protected getDefaultPresets(): Preset[];
|
|
||||||
/**
|
|
||||||
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
|
|
||||||
* @param tplId tplid to add to item
|
|
||||||
* @param id id to add to item
|
|
||||||
* @returns hydrated Item object
|
|
||||||
*/
|
|
||||||
protected createRagfairAssortItem(tplId: string, id?: string): Item;
|
|
||||||
}
|
|
@ -1,147 +0,0 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
|
||||||
import { Dynamic, IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { FenceService } from "../services/FenceService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
|
||||||
export declare class RagfairOfferGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected fenceService: FenceService;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
protected allowedFleaPriceItemsForBarter: {
|
|
||||||
tpl: string;
|
|
||||||
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;
|
|
||||||
/**
|
|
||||||
* Calculate the offer price that's listed on the flea listing
|
|
||||||
* @param offerRequirements barter requirements for offer
|
|
||||||
* @returns rouble cost of offer
|
|
||||||
*/
|
|
||||||
protected calculateOfferListingPrice(offerRequirements: OfferRequirement[]): number;
|
|
||||||
/**
|
|
||||||
* Get avatar url from trader table in db
|
|
||||||
* @param isTrader Is user we're getting avatar for a trader
|
|
||||||
* @param userId persons id to get avatar of
|
|
||||||
* @returns url of avatar
|
|
||||||
*/
|
|
||||||
protected getAvatarUrl(isTrader: boolean, userId: string): string;
|
|
||||||
/**
|
|
||||||
* Convert a count of currency into roubles
|
|
||||||
* @param currencyCount amount of currency to convert into roubles
|
|
||||||
* @param currencyType Type of currency (euro/dollar/rouble)
|
|
||||||
* @returns count of roubles
|
|
||||||
*/
|
|
||||||
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
|
||||||
protected getTraderId(userID: string): string;
|
|
||||||
protected getRating(userID: string): number;
|
|
||||||
/**
|
|
||||||
* Is the offers user rating growing
|
|
||||||
* @param userID user to check rating of
|
|
||||||
* @returns true if its growing
|
|
||||||
*/
|
|
||||||
protected getRatingGrowing(userID: string): boolean;
|
|
||||||
/**
|
|
||||||
* Get number of section until offer should expire
|
|
||||||
* @param userID Id of the offer owner
|
|
||||||
* @param time Time the offer is posted
|
|
||||||
* @returns number of seconds until offer expires
|
|
||||||
*/
|
|
||||||
protected getOfferEndTime(userID: string, time: number): number;
|
|
||||||
/**
|
|
||||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
|
||||||
* @param expiredOffers optional, expired offers to regenerate
|
|
||||||
*/
|
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
|
||||||
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
|
||||||
/**
|
|
||||||
* Generate trader offers on flea using the traders assort data
|
|
||||||
* @param traderID Trader to generate offers for
|
|
||||||
*/
|
|
||||||
generateFleaOffersForTrader(traderID: string): void;
|
|
||||||
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
|
|
||||||
/**
|
|
||||||
* Add missing conditions to an item if needed
|
|
||||||
* Durabiltiy for repairable items
|
|
||||||
* HpResource for medical items
|
|
||||||
* @param item item to add conditions to
|
|
||||||
* @returns Item with conditions added
|
|
||||||
*/
|
|
||||||
protected addMissingCondition(item: Item): Item;
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
|
||||||
/**
|
|
||||||
* Get an array of flea prices + item tpl, cached in generator class
|
|
||||||
* @returns array with tpl/price values
|
|
||||||
*/
|
|
||||||
protected getFleaPricesAsArray(): {
|
|
||||||
tpl: string;
|
|
||||||
price: number;
|
|
||||||
}[];
|
|
||||||
/**
|
|
||||||
* Create a random currency-based barter scheme for an array of items
|
|
||||||
* @param offerItems Items on offer
|
|
||||||
* @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;
|
|
||||||
}
|
|
@ -1,110 +0,0 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
|
||||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
|
||||||
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
/**
|
|
||||||
* Handle the creation of randomised scav case rewards
|
|
||||||
*/
|
|
||||||
export declare class ScavCaseRewardGenerator {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected scavCaseConfig: IScavCaseConfig;
|
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
|
||||||
* @param body client request
|
|
||||||
* @returns Product array
|
|
||||||
*/
|
|
||||||
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
|
||||||
/**
|
|
||||||
* Get all db items that are not blacklisted in scavcase config
|
|
||||||
* @returns filtered array of db items
|
|
||||||
*/
|
|
||||||
protected getDbItems(): ITemplateItem[];
|
|
||||||
/**
|
|
||||||
* Check if a template id has a blacklisted parent id
|
|
||||||
* @param tplid template id to check
|
|
||||||
* @returns true if item is blacklisted
|
|
||||||
*/
|
|
||||||
protected itemHasBlacklistedParent(tplid: string): boolean;
|
|
||||||
/**
|
|
||||||
* Pick a number of items to be rewards, the count is defined by the values in
|
|
||||||
* @param items item pool to pick rewards from
|
|
||||||
* @param itemFilters how the rewards should be filtered down (by item count)
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[];
|
|
||||||
/**
|
|
||||||
* Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig
|
|
||||||
* @returns true if reward should be money
|
|
||||||
*/
|
|
||||||
protected rewardShouldBeMoney(): boolean;
|
|
||||||
/**
|
|
||||||
* Choose if ammo should be a reward based on the ammoRewardChancePercent config chance in scavCaseConfig
|
|
||||||
* @returns true if reward should be ammo
|
|
||||||
*/
|
|
||||||
protected rewardShouldBeAmmo(): boolean;
|
|
||||||
/**
|
|
||||||
* Choose from rouble/dollar/euro at random
|
|
||||||
*/
|
|
||||||
protected getRandomMoney(): ITemplateItem;
|
|
||||||
/**
|
|
||||||
* Get a random ammo from items.json that is not in the ammo blacklist AND inside the price rage defined in scavcase.json config
|
|
||||||
* @param rarity The rarity this ammo reward is for
|
|
||||||
* @returns random ammo item from items.json
|
|
||||||
*/
|
|
||||||
protected getRandomAmmo(rarity: string): ITemplateItem;
|
|
||||||
/**
|
|
||||||
* Take all the rewards picked create the Product object array ready to return to calling code
|
|
||||||
* Also add a stack count to ammo and money
|
|
||||||
* @param rewardItems items to convert
|
|
||||||
* @returns Product array
|
|
||||||
*/
|
|
||||||
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[];
|
|
||||||
/**
|
|
||||||
* Add a randomised stack count to ammo or money items
|
|
||||||
* @param item money or ammo item
|
|
||||||
* @param resultItem money or ammo item with a randomise stack size
|
|
||||||
*/
|
|
||||||
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
|
||||||
_id: string;
|
|
||||||
_tpl: string;
|
|
||||||
upd: any;
|
|
||||||
}, rarity: string): void;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param dbItems all items from the items.json
|
|
||||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
|
||||||
* @returns filtered dbItems array
|
|
||||||
*/
|
|
||||||
protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[];
|
|
||||||
/**
|
|
||||||
* Gathers the reward options from config and scavcase.json into a single object
|
|
||||||
* @param scavCaseDetails scavcase.json values
|
|
||||||
* @returns ScavCaseRewardCountsAndPrices object
|
|
||||||
*/
|
|
||||||
protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices;
|
|
||||||
/**
|
|
||||||
* Randomises the size of ammo and money stacks
|
|
||||||
* @param itemToCalculate ammo or money item
|
|
||||||
* @param rarity rarity (common/rare/superrare)
|
|
||||||
* @returns value to set stack count to
|
|
||||||
*/
|
|
||||||
protected getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem, rarity: string): number;
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IWeather, IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { WindDirection } from "../models/enums/WindDirection";
|
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
|
||||||
export declare class WeatherGenerator {
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected applicationContext: ApplicationContext;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected weatherConfig: IWeatherConfig;
|
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
|
||||||
calculateGameTime(data: IWeatherData): IWeatherData;
|
|
||||||
/**
|
|
||||||
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
|
||||||
* Format to BSGs requirements
|
|
||||||
* @param currentDate current date
|
|
||||||
* @returns formatted time
|
|
||||||
*/
|
|
||||||
protected getBsgFormattedInRaidTime(currentDate: Date): string;
|
|
||||||
/**
|
|
||||||
* Get the current in-raid time
|
|
||||||
* @param currentDate (new Date())
|
|
||||||
* @returns Date object of current in-raid time
|
|
||||||
*/
|
|
||||||
getInRaidTime(currentDate: Date): Date;
|
|
||||||
/**
|
|
||||||
* Get current time formatted to fit BSGs requirement
|
|
||||||
* @param date date to format into bsg style
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected getBSGFormattedTime(date: Date): string;
|
|
||||||
/**
|
|
||||||
* Return randomised Weather data with help of config/weather.json
|
|
||||||
* @returns Randomised weather data
|
|
||||||
*/
|
|
||||||
generateWeather(): IWeather;
|
|
||||||
/**
|
|
||||||
* Set IWeather date/time/timestamp values to now
|
|
||||||
* @param weather Object to update
|
|
||||||
*/
|
|
||||||
protected setCurrentDateTime(weather: IWeather): void;
|
|
||||||
protected getWeightedWindDirection(): WindDirection;
|
|
||||||
protected getWeightedWindSpeed(): number;
|
|
||||||
protected getWeightedFog(): number;
|
|
||||||
protected getWeightedRain(): number;
|
|
||||||
protected getRandomFloat(node: string): number;
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
import { InventoryMagGen } from "./InventoryMagGen";
|
|
||||||
export interface IInventoryMagGen {
|
|
||||||
getPriority(): number;
|
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import { MinMax } from "../../models/common/MinMax";
|
|
||||||
import { Inventory } from "../../models/eft/common/tables/IBotBase";
|
|
||||||
import { ITemplateItem } from "../../models/eft/common/tables/ITemplateItem";
|
|
||||||
export declare class InventoryMagGen {
|
|
||||||
private magCounts;
|
|
||||||
private magazineTemplate;
|
|
||||||
private weaponTemplate;
|
|
||||||
private ammoTemplate;
|
|
||||||
private pmcInventory;
|
|
||||||
constructor(magCounts: MinMax, magazineTemplate: ITemplateItem, weaponTemplate: ITemplateItem, ammoTemplate: ITemplateItem, pmcInventory: Inventory);
|
|
||||||
getMagCount(): MinMax;
|
|
||||||
getMagazineTemplate(): ITemplateItem;
|
|
||||||
getWeaponTemplate(): ITemplateItem;
|
|
||||||
getAmmoTemplate(): ITemplateItem;
|
|
||||||
getPmcInventory(): Inventory;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { RandomUtil } from "../../../utils/RandomUtil";
|
|
||||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
|
||||||
import { InventoryMagGen } from "../InventoryMagGen";
|
|
||||||
export declare class BarrelInventoryMagGen implements IInventoryMagGen {
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
constructor(randomUtil: RandomUtil, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
|
||||||
getPriority(): number;
|
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { ItemHelper } from "../../../helpers/ItemHelper";
|
|
||||||
import { ILogger } from "../../../models/spt/utils/ILogger";
|
|
||||||
import { LocalisationService } from "../../../services/LocalisationService";
|
|
||||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
|
||||||
import { InventoryMagGen } from "../InventoryMagGen";
|
|
||||||
export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
|
||||||
getPriority(): number;
|
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
|
||||||
import { InventoryMagGen } from "../InventoryMagGen";
|
|
||||||
export declare class InternalMagazineInventoryMagGen implements IInventoryMagGen {
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
|
||||||
getPriority(): number;
|
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
|
||||||
import { QuestHelper } from "./QuestHelper";
|
|
||||||
export declare class AssortHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
|
|
||||||
/**
|
|
||||||
* Remove assorts from a trader that have not been unlocked yet
|
|
||||||
* @param pmcProfile player profile
|
|
||||||
* @param traderId traders id
|
|
||||||
* @param assort assort items from a trader
|
|
||||||
* @returns assort items minus locked quest assorts
|
|
||||||
*/
|
|
||||||
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, flea?: boolean): ITraderAssort;
|
|
||||||
/**
|
|
||||||
* Remove assorts from a trader that have not been unlocked yet
|
|
||||||
* @param pmcProfile player profile
|
|
||||||
* @param traderId traders id
|
|
||||||
* @param assort traders assorts
|
|
||||||
* @returns traders assorts minus locked loyality assorts
|
|
||||||
*/
|
|
||||||
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
|
|
||||||
/**
|
|
||||||
* Remove an item from an assort
|
|
||||||
* @param assort assort to modify
|
|
||||||
* @param itemID item id to remove from asort
|
|
||||||
* @returns Modified assort
|
|
||||||
*/
|
|
||||||
removeItemFromAssort(assort: ITraderAssort, itemID: string, flea?: boolean): ITraderAssort;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotHelper } from "./BotHelper";
|
|
||||||
export declare class BotDifficultyHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
|
|
||||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
|
||||||
/**
|
|
||||||
* Get difficulty settings for desired bot type, if not found use assault bot types
|
|
||||||
* @param type bot type to retreive difficulty of
|
|
||||||
* @param difficulty difficulty to get settings for (easy/normal etc)
|
|
||||||
* @returns Difficulty object
|
|
||||||
*/
|
|
||||||
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
|
||||||
/**
|
|
||||||
* Get difficulty settings for a PMC
|
|
||||||
* @param type "usec" / "bear"
|
|
||||||
* @param difficulty what difficulty to retrieve
|
|
||||||
* @returns Difficulty object
|
|
||||||
*/
|
|
||||||
protected getDifficultySettings(type: string, difficulty: string): Difficulty;
|
|
||||||
/**
|
|
||||||
* Translate chosen value from pre-raid difficulty dropdown into bot difficulty value
|
|
||||||
* @param dropDownDifficulty Dropdown difficulty value to convert
|
|
||||||
* @returns bot difficulty
|
|
||||||
*/
|
|
||||||
convertBotDifficultyDropdownToBotDifficulty(dropDownDifficulty: string): string;
|
|
||||||
/**
|
|
||||||
* Choose a random difficulty from - easy/normal/hard/impossible
|
|
||||||
* @returns random difficulty
|
|
||||||
*/
|
|
||||||
chooseRandomDifficulty(): string;
|
|
||||||
}
|
|
@ -1,86 +0,0 @@
|
|||||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
|
||||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
|
||||||
export declare class BotGeneratorHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Adds properties to an item
|
|
||||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
|
||||||
* @param itemTemplate Item extra properties are being generated for
|
|
||||||
* @param botRole Used by weapons to randomise the durability values. Null for non-equipped items
|
|
||||||
* @returns Item Upd object with extra properties
|
|
||||||
*/
|
|
||||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
|
||||||
upd?: Upd;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Get the chance for the light or laser to be set as active on weapon, default to 50% if no bot/equip settings found
|
|
||||||
* @param botRole role of bot with weapon
|
|
||||||
* @returns Percent chance to be active
|
|
||||||
*/
|
|
||||||
protected getLightLaserActiveChance(botRole: string): number;
|
|
||||||
/**
|
|
||||||
* Get the chance for the faceshield to be set as enabled, default to 75% if no bot/equip settings found
|
|
||||||
* @param botRole role of bot with faceshield
|
|
||||||
* @returns Percent chance to be active
|
|
||||||
*/
|
|
||||||
protected getFaceShieldActiveChance(botRole: string): number;
|
|
||||||
/**
|
|
||||||
* Create a repairable object for a weapon that containers durability + max durability properties
|
|
||||||
* @param itemTemplate weapon object being generated for
|
|
||||||
* @param botRole type of bot being generated for
|
|
||||||
* @returns Repairable object
|
|
||||||
*/
|
|
||||||
protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
|
||||||
/**
|
|
||||||
* Create a repairable object for an armor that containers durability + max durability properties
|
|
||||||
* @param itemTemplate weapon object being generated for
|
|
||||||
* @param botRole type of bot being generated for
|
|
||||||
* @returns Repairable object
|
|
||||||
*/
|
|
||||||
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
|
||||||
/**
|
|
||||||
* Can item be added to another item without conflict
|
|
||||||
* @param items Items to check compatiblilities with
|
|
||||||
* @param tplToCheck Tpl of the item to check for incompatibilities
|
|
||||||
* @param equipmentSlot Slot the item will be placed into
|
|
||||||
* @returns false if no incompatibilties, also has incompatibility reason
|
|
||||||
*/
|
|
||||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
|
|
||||||
incompatible: boolean;
|
|
||||||
reason: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Convert a bots role to the equipment role used in config/bot.json
|
|
||||||
* @param botRole Role to convert
|
|
||||||
* @returns Equipment role (e.g. pmc / assault / bossTagilla)
|
|
||||||
*/
|
|
||||||
getBotEquipmentRole(botRole: string): string;
|
|
||||||
}
|
|
||||||
/** TODO - move into own class */
|
|
||||||
export declare class ExhaustableArray<T> {
|
|
||||||
private itemPool;
|
|
||||||
private randomUtil;
|
|
||||||
private jsonUtil;
|
|
||||||
private pool;
|
|
||||||
constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
|
||||||
getRandomValue(): T;
|
|
||||||
getFirstValue(): T;
|
|
||||||
hasValues(): boolean;
|
|
||||||
}
|
|
88
Live/CWX_DebugTool/types/helpers/BotHelper.d.ts
vendored
88
Live/CWX_DebugTool/types/helpers/BotHelper.d.ts
vendored
@ -1,88 +0,0 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class BotHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
/**
|
|
||||||
* Get a template object for the specified botRole from bots.types db
|
|
||||||
* @param role botRole to get template for
|
|
||||||
* @returns IBotType object
|
|
||||||
*/
|
|
||||||
getBotTemplate(role: string): IBotType;
|
|
||||||
/**
|
|
||||||
* Randomise the chance the PMC will attack their own side
|
|
||||||
* Look up value in bot.json/chanceSameSideIsHostilePercent
|
|
||||||
* @param difficultySettings pmc difficulty settings
|
|
||||||
*/
|
|
||||||
randomisePmcHostility(difficultySettings: Difficulty): void;
|
|
||||||
/**
|
|
||||||
* Is the passed in bot role a PMC (usec/bear/pmc)
|
|
||||||
* @param botRole bot role to check
|
|
||||||
* @returns true if is pmc
|
|
||||||
*/
|
|
||||||
isBotPmc(botRole: string): boolean;
|
|
||||||
isBotBoss(botRole: string): boolean;
|
|
||||||
isBotFollower(botRole: string): boolean;
|
|
||||||
/**
|
|
||||||
* Add a bot to the FRIENDLY_BOT_TYPES array
|
|
||||||
* @param difficultySettings bot settings to alter
|
|
||||||
* @param typeToAdd bot type to add to friendly list
|
|
||||||
*/
|
|
||||||
addBotToFriendlyList(difficultySettings: Difficulty, typeToAdd: string): void;
|
|
||||||
/**
|
|
||||||
* Add a bot to the ENEMY_BOT_TYPES array, do not add itself if its on the enemy list
|
|
||||||
* @param difficultySettings bot settings to alter
|
|
||||||
* @param typesToAdd bot type to add to enemy list
|
|
||||||
*/
|
|
||||||
addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void;
|
|
||||||
/**
|
|
||||||
* Add a bot to the REVENGE_BOT_TYPES array
|
|
||||||
* @param difficultySettings bot settings to alter
|
|
||||||
* @param typesToAdd bot type to add to revenge list
|
|
||||||
*/
|
|
||||||
addBotToRevengeList(difficultySettings: Difficulty, typesToAdd: string[]): void;
|
|
||||||
/**
|
|
||||||
* Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check
|
|
||||||
* @param botRole the bot role to check if should be a pmc
|
|
||||||
* @returns true if should be a pmc
|
|
||||||
*/
|
|
||||||
shouldBotBePmc(botRole: string): boolean;
|
|
||||||
rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean;
|
|
||||||
botRoleIsPmc(botRole: string): boolean;
|
|
||||||
/**
|
|
||||||
* Get randomisation settings for bot from config/bot.json
|
|
||||||
* @param botLevel level of bot
|
|
||||||
* @param botEquipConfig bot equipment json
|
|
||||||
* @returns RandomisationDetails
|
|
||||||
*/
|
|
||||||
getBotRandomisationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
|
||||||
/**
|
|
||||||
* Choose between sptBear and sptUsec at random based on the % defined in botConfig.pmc.isUsec
|
|
||||||
* @returns pmc role
|
|
||||||
*/
|
|
||||||
getRandomisedPmcRole(): string;
|
|
||||||
/**
|
|
||||||
* Get the corrisponding side when sptBear or sptUsec is passed in
|
|
||||||
* @param botRole role to get side for
|
|
||||||
* @returns side (usec/bear)
|
|
||||||
*/
|
|
||||||
getPmcSideByRole(botRole: string): string;
|
|
||||||
/**
|
|
||||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
|
||||||
* @returns pmc side as string
|
|
||||||
*/
|
|
||||||
protected getRandomisedPmcSide(): string;
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
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 { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { ContainerHelper } from "./ContainerHelper";
|
|
||||||
import { InventoryHelper } from "./InventoryHelper";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
|
||||||
export declare class BotWeaponGeneratorHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected containerHelper: ContainerHelper;
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
|
||||||
/**
|
|
||||||
* Get a randomised number of bullets for a specific magazine
|
|
||||||
* @param magCounts min and max count of magazines
|
|
||||||
* @param magTemplate magazine to generate bullet count for
|
|
||||||
* @returns bullet count number
|
|
||||||
*/
|
|
||||||
getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
|
||||||
/**
|
|
||||||
* Get a randomised count of magazines
|
|
||||||
* @param magCounts min and max value returned value can be between
|
|
||||||
* @returns numberical value of magazine count
|
|
||||||
*/
|
|
||||||
getRandomisedMagazineCount(magCounts: MinMax): number;
|
|
||||||
/**
|
|
||||||
* Is this magazine cylinder related (revolvers and grenade launchers)
|
|
||||||
* @param magazineParentName the name of the magazines parent
|
|
||||||
* @returns true if it is cylinder related
|
|
||||||
*/
|
|
||||||
magazineIsCylinderRelated(magazineParentName: string): boolean;
|
|
||||||
/**
|
|
||||||
* Create a magazine using the parameters given
|
|
||||||
* @param magazineTpl Tpl of the magazine to create
|
|
||||||
* @param ammoTpl Ammo to add to magazine
|
|
||||||
* @param magTemplate template object of magazine
|
|
||||||
* @returns Item array
|
|
||||||
*/
|
|
||||||
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
|
|
||||||
/**
|
|
||||||
* Add a specific number of cartrdiges to a bots inventory (vest/pocket)
|
|
||||||
* @param ammoTpl Ammo tpl to add to vest/pockets
|
|
||||||
* @param cartridgeCount number of cartridges to add to vest/pockets
|
|
||||||
* @param inventory bot inventory to add cartridges to
|
|
||||||
*/
|
|
||||||
addBulletsToVestAndPockets(ammoTpl: string, cartridgeCount: number, inventory: Inventory): void;
|
|
||||||
/**
|
|
||||||
* Get a weapons default magazine template id
|
|
||||||
* @param weaponTemplate weapon to get default magazine for
|
|
||||||
* @returns tpl of magazine
|
|
||||||
*/
|
|
||||||
getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
|
||||||
/**
|
|
||||||
* Adds an item with all its childern into specified equipmentSlots, wherever it fits.
|
|
||||||
* @param equipmentSlots
|
|
||||||
* @param parentId
|
|
||||||
* @param parentTpl
|
|
||||||
* @param itemWithChildren
|
|
||||||
* @param inventory
|
|
||||||
* @returns a `boolean` indicating item was added
|
|
||||||
*/
|
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean;
|
|
||||||
/**
|
|
||||||
* is the provided item allowed inside a container
|
|
||||||
* @param slot location item wants to be placed in
|
|
||||||
* @param itemTpl item being placed
|
|
||||||
* @returns true if allowed
|
|
||||||
*/
|
|
||||||
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
export declare class FindSlotResult {
|
|
||||||
success: boolean;
|
|
||||||
x: any;
|
|
||||||
y: any;
|
|
||||||
rotation: boolean;
|
|
||||||
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;
|
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
import { Item } from "../models/eft/common/tables/IItem";
|
|
||||||
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
|
|
||||||
import { MessageType } from "../models/enums/MessageType";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
|
||||||
import { NotificationSendHelper } from "./NotificationSendHelper";
|
|
||||||
import { NotifierHelper } from "./NotifierHelper";
|
|
||||||
export declare class DialogueHelper {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected notifierHelper: NotifierHelper;
|
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
|
||||||
/**
|
|
||||||
* Add a templated message to the dialogue.
|
|
||||||
* @param dialogueID
|
|
||||||
* @param messageContent
|
|
||||||
* @param sessionID
|
|
||||||
* @param rewards
|
|
||||||
*/
|
|
||||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void;
|
|
||||||
/**
|
|
||||||
* Get the preview contents of the last message in a dialogue.
|
|
||||||
* @param dialogue
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getMessagePreview(dialogue: Dialogue): MessagePreview;
|
|
||||||
/**
|
|
||||||
* Get the item contents for a particular message.
|
|
||||||
* @param messageID
|
|
||||||
* @param sessionID
|
|
||||||
* @param itemId Item being moved to inventory
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getMessageItemContents(messageID: string, sessionID: string, itemId: string): Item[];
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
import { BotHelper } from "./BotHelper";
|
|
||||||
export declare class DurabilityLimitsHelper {
|
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected botConfig: IBotConfig;
|
|
||||||
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
|
||||||
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
|
||||||
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
|
||||||
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
|
||||||
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
|
||||||
protected generateMaxWeaponDurability(botRole: string): number;
|
|
||||||
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
|
||||||
protected getLowestMaxWeaponFromConfig(botRole: string): number;
|
|
||||||
protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number;
|
|
||||||
protected generateWeaponDurability(botRole: string, maxDurability: number): number;
|
|
||||||
protected generateArmorDurability(botRole: string, maxDurability: number): number;
|
|
||||||
protected getMinWeaponDeltaFromConfig(botRole: string): number;
|
|
||||||
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
|
|
||||||
protected getMinArmorDeltaFromConfig(botRole: string): number;
|
|
||||||
protected getMaxArmorDeltaFromConfig(botRole: string): number;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user