This commit is contained in:
CWX 2022-06-08 22:09:11 +01:00
parent f21be476bb
commit d26c1b7987
3245 changed files with 71062 additions and 4086 deletions

View File

@ -1,8 +1,26 @@
{
"name": "HideoutArchitect",
"author": "Faupi",
"version": "1.5.0",
"license": "NCSA Open Source",
"main": "./src/hideoutarchitect.js",
"akiVersion": "3.0.0"
}
"license": "NCSA Open Source",
"author": "Faupi",
"akiVersion": "3.0.0",
"updated by": "CWX",
"scripts": {
"setup:environment": "npm i",
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" ./**/*.* ./dist",
"zip:files": "cd dist/ && bestzip ../mod.zip *",
"build:zip": "npm run clean:environment && npm run build:unzipped && npm run zip:files",
"clean:environment": "node -e \"require('fs').rm('mod.zip', ()=>{})\" && node -e \"require('fs').rmdir('./dist/',{recursive:true},()=>{})\""
},
"devDependencies": {
"@types/node": "^14.15.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"copyfiles": "2.4.1",
"eslint": "7.26.0",
"tsyringe": "4.6.0",
"typescript": "4.6.4",
"bestzip": "2.2.1"
}
}

View File

@ -1,15 +1,14 @@
import type { DependencyContainer } from "tsyringe";
import { IMod } from "../types/models/external/mod";
import { ILogger } from "../types/models/spt/utils/ILogger";
import { DynamicRouterModService } from "../types/services/mod/dynamicRouter/DynamicRouterModService"
import { DatabaseServer } from "../types/servers/DatabaseServer"
import { JsonUtil } from "../types/utils/JsonUtil"
import { InitialModLoader } from "../types/loaders/InitialModLoader"
const path = require('path');
import { IMod } from "@spt-aki/models/external/mod";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService"
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"
import { JsonUtil } from "@spt-aki/utils/JsonUtil"
import { InitialModLoader } from "@spt-aki/loaders/InitialModLoader"
class HideoutArchitect implements IMod
{
private path;
private logger: ILogger;
private database: DatabaseServer;
private router: DynamicRouterModService;
@ -24,12 +23,13 @@ class HideoutArchitect implements IMod
{
this.logger = container.resolve<ILogger>("WinstonLogger");
this.router = container.resolve<DynamicRouterModService>("DynamicRouterModService");
this.path = require("path");
this.json = container.resolve<JsonUtil>("JsonUtil");
this.mod = require("../package.json");
this.translations = require("../res/translations.json");
this.logger.info(`Loading: ${this.mod.name} ${this.mod.version}`);
this.hookRoutes();
}
public delayedLoad(container: DependencyContainer)
@ -43,12 +43,17 @@ class HideoutArchitect implements IMod
private loadLocalization()
{
for(let language in this.translations){
if(!(language in this.globalLocale)) continue;
let attrKvPair = this.translations[language];
for(let attrKey in attrKvPair){
let attrValue = attrKvPair[attrKey];
for (const language in this.translations)
{
if (!(language in this.globalLocale))
{
continue;
}
const attrKvPair = this.translations[language];
for (const attrKey in attrKvPair)
{
const attrValue = attrKvPair[attrKey];
this.globalLocale[language].interface[attrKey] = attrValue;
}
@ -72,14 +77,14 @@ class HideoutArchitect implements IMod
)
}
private getModInfo(url, info, sessionId, output)
private getModInfo(url: string, info: any, sessionId: string, output: string)
{
var modOutput = {
const modOutput = {
status: 1,
data: null
};
modOutput.data = {...this.mod, ...{path: path.resolve(this.modLoader.getModPath(this.mod.name))}};
modOutput.data = {...this.mod, ...{path: this.path.resolve(this.modLoader.getModPath(this.mod.name))}};
modOutput.status = 0;
return this.json.serialize(modOutput);

View File

@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class BotCallbacks {
private botController;
private httpResponse;
protected botController: BotController;
protected httpResponse: HttpResponseUtil;
constructor(botController: BotController, httpResponse: HttpResponseUtil);
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;

View File

@ -1,15 +1,16 @@
import { BundleLoader } from "../loaders/BundleLoader";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { IHttpServer } from "../models/spt/server/IHttpServer";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class BundleCallbacks {
private logger;
private httpResponse;
private httpServer;
private bundleLoader;
private configServer;
private httpConfig;
protected logger: ILogger;
protected httpResponse: HttpResponseUtil;
protected httpServer: IHttpServer;
protected bundleLoader: BundleLoader;
protected configServer: ConfigServer;
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
getBundles(url: string, info: any, sessionID: string): string;

View File

@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class CustomizationCallbacks {
private customizationController;
private saveServer;
private httpResponse;
protected customizationController: CustomizationController;
protected saveServer: SaveServer;
protected httpResponse: HttpResponseUtil;
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
_id: string;

View File

@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class DataCallbacks {
private httpResponse;
private databaseServer;
protected httpResponse: HttpResponseUtil;
protected databaseServer: DatabaseServer;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;

View File

@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class DialogueCallbacks extends OnUpdate {
private hashUtil;
private timeUtil;
private httpResponse;
private dialogueController;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil;
protected dialogueController: DialogueController;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;

View File

@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { Watermark } from "../utils/Watermark";
declare class GameCallbacks {
private httpResponse;
private watermark;
private gameController;
protected httpResponse: HttpResponseUtil;
protected watermark: Watermark;
protected gameController: GameController;
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

@ -1,7 +1,7 @@
import { HandbookController } from "../controllers/HandbookController";
import { OnLoad } from "../di/OnLoad";
export declare class HandbookCallbacks extends OnLoad {
private handbookController;
protected handbookController: HandbookController;
constructor(handbookController: HandbookController);
onLoad(): void;
getRoute(): string;

View File

@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class HealthCallbacks {
private httpResponse;
private profileHelper;
private healthController;
protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper;
protected healthController: HealthController;
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog
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 {
private hideoutController;
private configServer;
private hideoutConfig;
protected hideoutController: HideoutController;
protected configServer: ConfigServer;
protected hideoutConfig: IHideoutConfig;
constructor(hideoutController: HideoutController, // TODO: delay needed
configServer: ConfigServer);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,7 +1,7 @@
import { OnLoad } from "../di/OnLoad";
import { IHttpServer } from "../models/spt/server/IHttpServer";
export declare class HttpCallbacks extends OnLoad {
private httpServer;
protected httpServer: IHttpServer;
constructor(httpServer: IHttpServer);
onLoad(): void;
getRoute(): string;

View File

@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
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 { ConfigServer } from "../servers/ConfigServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class InraidCallbacks {
private inraidController;
private httpResponse;
private configServer;
private airdropConfig;
private inraidConfig;
protected inraidController: InraidController;
protected httpResponse: HttpResponseUtil;
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig;
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;

View File

@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
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 OnLoadOnUpdate {
private insuranceController;
private insuranceService;
private httpResponse;
private configServer;
private insuranceConfig;
protected insuranceController: InsuranceController;
protected insuranceService: InsuranceService;
protected httpResponse: HttpResponseUtil;
protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig;
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
onLoad(): void;
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class InventoryCallbacks {
private inventoryController;
protected inventoryController: InventoryController;
constructor(inventoryController: InventoryController);
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class ItemEventCallbacks {
private httpResponse;
private itemEventRouter;
protected httpResponse: HttpResponseUtil;
protected itemEventRouter: ItemEventRouter;
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
}

View File

@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { Watermark } from "../utils/Watermark";
declare class LauncherCallbacks {
private httpResponse;
private launcherController;
private saveServer;
private watermark;
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;

View File

@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class LocationCallbacks {
private httpResponse;
private locationController;
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>;

View File

@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class MatchCallbacks {
private httpResponse;
private jsonUtil;
private matchController;
private databaseServer;
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: any, sessionID: string): INullResponseData;
exitMatch(url: string, info: any, sessionID: string): INullResponseData;

View File

@ -1,16 +1,17 @@
import { OnLoad } from "../di/OnLoad";
import { DelayedModLoader } from "../loaders/DelayedModLoader";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { IHttpServer } from "../models/spt/server/IHttpServer";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
declare class ModCallbacks extends OnLoad {
private logger;
private httpResponse;
private httpServer;
private modLoader;
private configServer;
private httpConfig;
protected logger: ILogger;
protected httpResponse: HttpResponseUtil;
protected httpServer: IHttpServer;
protected modLoader: DelayedModLoader;
protected configServer: ConfigServer;
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer);
onLoad(): void;
getRoute(): string;

View File

@ -3,7 +3,7 @@ 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 {
private noteController;
protected noteController: NoteController;
constructor(noteController: NoteController);
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class NotifierCallbacks {
private httpServerHelper;
private httpResponse;
private notifierController;
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
@ -16,7 +16,7 @@ export declare class NotifierCallbacks {
* 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;
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>;
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class PresetBuildCallbacks {
private httpResponse;
private presetBuildController;
protected httpResponse: HttpResponseUtil;
protected presetBuildController: PresetBuildController;
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,7 +1,7 @@
import { PresetController } from "../controllers/PresetController";
import { OnLoad } from "../di/OnLoad";
export declare class PresetCallbacks extends OnLoad {
private presetController;
protected presetController: PresetController;
constructor(presetController: PresetController);
onLoad(): void;
getRoute(): string;

View File

@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class ProfileCallbacks {
private httpResponse;
private timeUtil;
private profileController;
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>;
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class QuestCallbacks {
private httpResponse;
private questController;
private repeatableQuestController;
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;

View File

@ -3,6 +3,7 @@ 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";
@ -10,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairCallbacks extends OnLoadOnUpdate {
private httpResponse;
private logger;
private jsonUtil;
private ragfairServer;
private ragfairController;
private configServer;
private ragfairConfig;
protected httpResponse: HttpResponseUtil;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected ragfairServer: RagfairServer;
protected ragfairController: RagfairController;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
onLoad(): void;
getRoute(): string;
@ -33,4 +35,5 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
onUpdate(timeSinceLastRun: number): boolean;
sendReport(url: string, info: any, sessionID: string): INullResponseData;
}

View File

@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
export declare class RepairCallbacks {
private repairController;
protected repairController: RepairController;
constructor(repairController: RepairController);
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;

View File

@ -1,7 +1,7 @@
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { SaveServer } from "../servers/SaveServer";
export declare class SaveCallbacks extends OnLoadOnUpdate {
private saveServer;
protected saveServer: SaveServer;
constructor(saveServer: SaveServer);
onLoad(): void;
getRoute(): string;

View File

@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
export declare class TradeCallbacks {
private tradeController;
protected tradeController: TradeController;
constructor(tradeController: TradeController);
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TraderCallbacks extends OnLoadOnUpdate {
private httpResponse;
private traderController;
protected httpResponse: HttpResponseUtil;
protected traderController: TraderController;
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
onLoad(): void;
getRoute(): string;

View File

@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class WeatherCallbacks {
private httpResponse;
private weatherController;
protected httpResponse: HttpResponseUtil;
protected weatherController: WeatherController;
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
}

View File

@ -3,7 +3,7 @@ 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 {
private wishlistController;
protected wishlistController: WishlistController;
constructor(wishlistController: WishlistController);
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,20 +1,35 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { Difficulty } from "../models/eft/common/tables/IBotType";
import { BotGenerator } from "../generators/BotGenerator";
import { BotHelper } from "../helpers/BotHelper";
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 { ConfigServer } from "../servers/ConfigServer";
import { BotHelper } from "../helpers/BotHelper";
import { BotGenerator } from "../generators/BotGenerator";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class BotController {
private databaseServer;
private botGenerator;
private botHelper;
private configServer;
private botConfig;
protected databaseServer: DatabaseServer;
protected botGenerator: BotGenerator;
protected botHelper: BotHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
getBotLimit(type: string): number;
getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty;
/**
* Return the number of bot loadout varieties to be generated
* @param type bot Type we want the loadout gen count for
* @returns
*/
getBotPresetGenerationLimit(type: string): number;
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;
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
getBotCap(): number;
}

View File

@ -1,22 +1,22 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
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 { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
export declare class CustomizationController {
private logger;
private itemEventRouter;
private databaseServer;
private saveServer;
private profileHelper;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected saveServer: SaveServer;
protected profileHelper: ProfileHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
getTraderSuits(traderID: string, sessionID: string): ISuit[];
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
private getAllTraderSuits;
protected getAllTraderSuits(sessionID: string): ISuit[];
}

View File

@ -1,15 +1,15 @@
import { SaveServer } from "../servers/SaveServer";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class DialogueController {
private httpResponse;
private saveServer;
private dialogueHelper;
protected httpResponse: HttpResponseUtil;
protected saveServer: SaveServer;
protected dialogueHelper: DialogueHelper;
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
getFriendList(sessionID: string): IGetFriendListDataResponse;
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
@ -19,6 +19,7 @@ export declare class DialogueController {
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
setRead(dialogueIDs: string[], sessionID: string): void;
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
private removeExpiredItems;
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
protected removeExpiredItems(sessionID: string): void;
update(): void;
}

View File

@ -1,20 +1,32 @@
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { Watermark } from "../utils/Watermark";
export declare class GameController {
private logger;
private watermark;
private httpServerHelper;
private profileHelper;
private configServer;
private httpConfig;
protected logger: ILogger;
protected watermark: Watermark;
protected httpServerHelper: HttpServerHelper;
protected profileHelper: ProfileHelper;
protected configServer: ConfigServer;
protected httpConfig: IHttpConfig;
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
gameStart(url: string, info: IEmptyRequestData, sessionID: string): void;
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
protected addMissingBonusesProperty(pmcProfile: IPmcData): void;
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void;
protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void;
protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void;
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
protected removeDanglingConditionCounters(pmcProfile: IPmcData): void;
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): any[];
private getActiveRepeatableQuests;
protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[];
}

View File

@ -1,8 +1,8 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class HandbookController {
private databaseServer;
private handbookHelper;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
load(): void;
}

View File

@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthController {
private logger;
private itemEventRouter;
private itemHelper;
private paymentService;
private inventoryHelper;
private healthHelper;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper;
protected healthHelper: HealthHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,46 +1,47 @@
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { HashUtil } from "../utils/HashUtil";
import { SaveServer } from "../servers/SaveServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { PlayerService } from "../services/PlayerService";
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 { PaymentHelper } from "../helpers/PaymentHelper";
import { InventoryHelper } from "../helpers/InventoryHelper";
import { HideoutHelper } from "../helpers/HideoutHelper";
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
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 { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { PlayerService } from "../services/PlayerService";
import { HashUtil } from "../utils/HashUtil";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class HideoutController {
private logger;
private hashUtil;
private timeUtil;
private databaseServer;
private randomUtil;
private inventoryHelper;
private saveServer;
private playerService;
private presetHelper;
private paymentHelper;
private itemEventRouter;
private httpResponse;
private profileHelper;
private hideoutHelper;
private configServer;
private hideoutConfig;
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 itemEventRouter: ItemEventRouter;
protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper;
protected hideoutHelper: HideoutHelper;
protected configServer: ConfigServer;
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,29 +1,30 @@
import { SaveServer } from "../servers/SaveServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "../helpers/ItemHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { JsonUtil } from "../utils/JsonUtil";
import { QuestHelper } from "../helpers/QuestHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
import { JsonUtil } from "../utils/JsonUtil";
export declare class InraidController {
private saveServer;
private jsonUtil;
private databaseServer;
private questHelper;
private itemHelper;
private extendedProfileHelper;
private healthHelper;
private traderHelper;
private insuranceService;
private inRaidHelper;
private configServer;
private inraidConfig;
protected saveServer: SaveServer;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected extendedProfileHelper: ExtendedProfileHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
protected inRaidHelper: InRaidHelper;
protected configServer: ConfigServer;
protected inraidConfig: IInRaidConfig;
constructor(saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, extendedProfileHelper: ExtendedProfileHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;

View File

@ -1,33 +1,34 @@
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { SaveServer } from "../servers/SaveServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { PaymentService } from "../services/PaymentService";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
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 { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { InsuranceService } from "../services/InsuranceService";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
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 {
private logger;
private randomUtil;
private itemEventRouter;
private timeUtil;
private saveServer;
private databaseServer;
private itemHelper;
private profileHelper;
private dialogueHelper;
private paymentService;
private insuranceService;
private configServer;
private insuranceConfig;
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected itemEventRouter: ItemEventRouter;
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, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required
insuranceService: InsuranceService, configServer: ConfigServer);
processReturn(): void;

View File

@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class InventoryController {
private logger;
private hashUtil;
private jsonUtil;
private databaseServer;
private presetHelper;
private inventoryHelper;
private profileHelper;
private paymentHelper;
private itemEventRouter;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected presetHelper: PresetHelper;
protected inventoryHelper: InventoryHelper;
protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
/**
* Move Item

View File

@ -1,25 +1,26 @@
import { HashUtil } from "../utils/HashUtil";
import { SaveServer } from "../servers/SaveServer";
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 { IRegisterData } from "../models/eft/launcher/IRegisterData";
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
import { Info } from "../models/eft/profile/IAkiProfile";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { SaveServer } from "../servers/SaveServer";
import { HashUtil } from "../utils/HashUtil";
export declare class LauncherController {
private hashUtil;
private saveServer;
private httpServerHelper;
private databaseServer;
private configServer;
private coreConfig;
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;
private createAccount;
protected createAccount(info: IRegisterData): string;
changeUsername(info: IChangeRequestData): string;
changePassword(info: IChangeRequestData): string;
wipe(info: IRegisterData): string;

View File

@ -1,16 +1,16 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { LocationGenerator } from "../generators/LocationGenerator";
import { ILocationBase } from "../models/eft/common/ILocationBase";
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class LocationController {
private jsonUtil;
private logger;
private locationGenerator;
private databaseServer;
private timeUtil;
protected jsonUtil: JsonUtil;
protected logger: ILogger;
protected locationGenerator: LocationGenerator;
protected databaseServer: DatabaseServer;
protected timeUtil: TimeUtil;
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
get(location: string): ILocationBase;
generate(name: string): ILocationBase;

View File

@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer";
import { MatchLocationService } from "../services/MatchLocationService";
export declare class MatchController {
private saveServer;
private profileHelper;
private matchLocationService;
private traderHelper;
private configServer;
private matchConfig;
private inraidConfig;
protected saveServer: SaveServer;
protected profileHelper: ProfileHelper;
protected matchLocationService: MatchLocationService;
protected traderHelper: TraderHelper;
protected configServer: ConfigServer;
protected matchConfig: IMatchConfig;
protected inraidConfig: IInRaidConfig;
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[];
private getMatch;
protected getMatch(location: any): any;
createGroup(sessionID: string, info: any): any;
deleteGroup(info: any): void;
joinMatch(info: any, sessionID: string): any[];

View File

@ -1,9 +1,9 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { ItemEventRouter } from "../routers/ItemEventRouter";
declare class NoteController {
private itemEventRouter;
protected itemEventRouter: ItemEventRouter;
constructor(itemEventRouter: ItemEventRouter);
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService";
import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
export declare class NotifierController {
private notifierHelper;
private httpServerHelper;
private notificationService;
private pollInterval;
private timeout;
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.

View File

@ -1,16 +1,16 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { SaveServer } from "../servers/SaveServer";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { HashUtil } from "../utils/HashUtil";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { SaveServer } from "../servers/SaveServer";
import { HashUtil } from "../utils/HashUtil";
export declare class PresetBuildController {
private hashUtil;
private itemEventRouter;
private itemHelper;
private saveServer;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected itemHelper: ItemHelper;
protected saveServer: SaveServer;
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
getUserBuilds(sessionID: string): WeaponBuild[];
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,8 +1,8 @@
import { PresetHelper } from "../helpers/PresetHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class PresetController {
private presetHelper;
private databaseServer;
protected presetHelper: PresetHelper;
protected databaseServer: DatabaseServer;
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
initialize(): void;
}

View File

@ -1,26 +1,26 @@
import { SaveServer } from "../servers/SaveServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
import { ItemHelper } from "../helpers/ItemHelper";
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 { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
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 { HashUtil } from "../utils/HashUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
export declare class ProfileController {
private hashUtil;
private timeUtil;
private saveServer;
private databaseServer;
private itemHelper;
private traderHelper;
private extendedProfileHelper;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected traderHelper: TraderHelper;
protected extendedProfileHelper: ExtendedProfileHelper;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
getMiniProfiles(): IMiniProfile[];
getMiniProfile(sessionID: string): any;

View File

@ -1,33 +1,34 @@
import { TimeUtil } from "../utils/TimeUtil";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { QuestHelper } from "../helpers/QuestHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { PlayerService } from "../services/PlayerService";
import { QuestHelper } from "../helpers/QuestHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IQuest } from "../models/eft/common/tables/IQuest";
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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { PlayerService } from "../services/PlayerService";
import { TimeUtil } from "../utils/TimeUtil";
export declare class QuestController {
private logger;
private timeUtil;
private itemEventRouter;
private databaseServer;
private itemHelper;
private dialogueHelper;
private profileHelper;
private questHelper;
private questConditionHelper;
private playerService;
private configServer;
private questConfig;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper;
protected profileHelper: ProfileHelper;
protected questHelper: QuestHelper;
protected questConditionHelper: QuestConditionHelper;
protected playerService: PlayerService;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer);
getClientQuests(sessionID: string): IQuest[];
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
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 { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class RagfairController {
private logger;
private timeUtil;
private httpResponse;
private itemEventRouter;
private ragfairServer;
private ragfairPriceService;
private databaseServer;
private itemHelper;
private saveServer;
private ragfairSellHelper;
private ragfairTaxHelper;
private ragfairSortHelper;
private ragfairOfferHelper;
private profileHelper;
private paymentService;
private handbookHelper;
private paymentHelper;
private inventoryHelper;
private ragfairHelper;
private ragfairOfferService;
private ragfairRequiredItemsService;
private ragfairOfferGenerator;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil;
protected itemEventRouter: ItemEventRouter;
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 ragfairHelper: RagfairHelper;
protected ragfairOfferService: RagfairOfferService;
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
protected ragfairOfferGenerator: RagfairOfferGenerator;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, 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, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
update(): void;

View File

@ -1,25 +1,26 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { PaymentService } from "../services/PaymentService";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { ConfigServer } from "../servers/ConfigServer";
import { ItemEventRouter } from "../routers/ItemEventRouter";
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 { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "../services/PaymentService";
export declare class RepairController {
private logger;
private itemEventRouter;
private databaseServer;
private questHelper;
private traderHelper;
private paymentService;
private repairHelper;
private configServer;
private repairConfig;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper;
protected traderHelper: TraderHelper;
protected paymentService: PaymentService;
protected repairHelper: RepairHelper;
protected configServer: ConfigServer;
protected repairConfig: IRepairConfig;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
/**
* Repair with trader

View File

@ -8,7 +8,8 @@ import { IPmcData, TraderInfo } from "../models/eft/common/IPmcData";
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
import { ELocationName, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
import { ELocationName } from "../models/enums/ELocationName";
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -47,21 +48,21 @@ export interface ITargetLocation {
locations: string[];
}
export declare class RepeatableQuestController {
private timeUtil;
private logger;
private randomUtil;
private mathUtil;
private jsonUtil;
private databaseServer;
private itemHelper;
private presetHelper;
private profileHelper;
private ragfairServerHelper;
private itemEventRouter;
private paymentService;
private objectId;
private configServer;
private questConfig;
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 ragfairServerHelper: RagfairServerHelper;
protected itemEventRouter: ItemEventRouter;
protected paymentService: PaymentService;
protected objectId: ObjectId;
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, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
/**
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
@ -88,7 +89,7 @@ export declare class RepeatableQuestController {
* @param {string} sessionId Player's session id
* @returns {array} array of "repeatableQuestObjects" as descibed above
*/
getClientRepeatableQuests(info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): 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

View File

@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
declare class TradeController {
private logger;
private itemEventRouter;
private tradeHelper;
private profileHelper;
private ragfairServer;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected tradeHelper: TradeHelper;
protected profileHelper: ProfileHelper;
protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, 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;

View File

@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class TraderController {
private logger;
private databaseServer;
private traderAssortHelper;
private profileHelper;
private traderHelper;
private timeUtil;
private traderAssortService;
private jsonUtil;
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected traderAssortHelper: TraderAssortHelper;
protected profileHelper: ProfileHelper;
protected traderHelper: TraderHelper;
protected timeUtil: TimeUtil;
protected traderAssortService: TraderAssortService;
protected jsonUtil: JsonUtil;
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil);
load(): void;
getTrader(traderID: string, sessionID: string): ITraderBase;

View File

@ -1,10 +1,11 @@
import { ConfigServer } from "../servers/ConfigServer";
import { WeatherGenerator } from "../generators/WeatherGenerator";
import { IWeatherData } from "../models/eft/weather/IWeatherData";
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
import { ConfigServer } from "../servers/ConfigServer";
export declare class WeatherController {
private weatherGenerator;
private configServer;
private weatherConfig;
protected weatherGenerator: WeatherGenerator;
protected configServer: ConfigServer;
protected weatherConfig: IWeatherConfig;
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
generate(): IWeatherData;
}

View File

@ -3,7 +3,7 @@ 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 {
private itemEvenRouter;
protected itemEvenRouter: ItemEventRouter;
constructor(itemEvenRouter: ItemEventRouter);
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,36 +1,46 @@
import { HashUtil } from "../utils/HashUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { ILogger } from "../models/spt/utils/ILogger";
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
import { ConfigServer } from "../servers/ConfigServer";
import { GameEventHelper } from "../helpers/GameEventHelper";
import { BotInventoryGenerator } from "./BotInventoryGenerator";
import { BotHelper } from "../helpers/BotHelper";
import { GameEventHelper } from "../helpers/GameEventHelper";
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
import { Health as PmcHealth } from "../models/eft/common/IPmcData";
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { Health, Inventory, Skills } 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 { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { BotInventoryGenerator } from "./BotInventoryGenerator";
declare namespace BotGenerator {
interface IRandomisedBotLevelResult {
level: number;
exp: number;
}
}
export declare class BotGenerator {
private logger;
private hashUtil;
private randomUtil;
private jsonUtil;
private databaseServer;
private botInventoryGenerator;
private botHelper;
private gameEventHelper;
private configServer;
private botConfig;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected botInventoryGenerator: BotInventoryGenerator;
protected botHelper: BotHelper;
protected gameEventHelper: GameEventHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
private generateBot;
private generateRandomLevel;
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
/** Converts health object to the required format */
private generateHealth;
private generateSkills;
private getPmcRole;
private removeChristmasItemsFromBotInventory;
private generateId;
private generateInventoryID;
private getPMCDifficulty;
private generateDogtag;
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
protected generateSkills(skillsObj: Skills): Skills;
protected getPmcRole(pmcSide: string): string;
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
protected generateId(bot: IBotBase): IBotBase;
protected generateInventoryID(profile: IBotBase): IBotBase;
protected getPMCDifficulty(requestedDifficulty: string): string;
protected generateDogtag(bot: IBotBase): IBotBase;
}
export {};

View File

@ -1,5 +1,5 @@
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { Inventory, Chances, Generation } from "../models/eft/common/tables/IBotType";
import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType";
import { HashUtil } from "../utils/HashUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
export declare class BotInventoryGenerator {
private logger;
private hashUtil;
private randomUtil;
private databaseServer;
private botWeaponGenerator;
private botLootGenerator;
private botGeneratorHelper;
private weightedRandomHelper;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected botWeaponGenerator: BotWeaponGenerator;
protected botLootGenerator: BotLootGenerator;
protected botGeneratorHelper: BotGeneratorHelper;
protected weightedRandomHelper: WeightedRandomHelper;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper);
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
private generateEquipment;
private generateInventoryBase;
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
protected generateInventoryBase(): PmcInventory;
}

View File

@ -1,27 +1,29 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { PMCLootGenerator } from "../generators/PMCLootGenerator";
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
export declare class BotLootGenerator {
private jsonUtil;
private hashUtil;
private randomUtil;
private databaseServer;
private handbookHelper;
private botGeneratorHelper;
private pmcLootGenerator;
private configServer;
private botConfig;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected pmcLootGenerator: PMCLootGenerator;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer);
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void;
private getRandomisedCount;
private addLootFromPool;
protected getRandomisedCount(min: number, max: number, nValue: number): number;
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], count: number, inventory: PmcInventory, totalValueLimit?: number, useLimits?: boolean): void;
/** Compares two item templates by their price to spawn chance ratio */
private compareByValue;
protected compareByValue(a: ITemplateItem, b: ITemplateItem): number;
}

View File

@ -3,22 +3,24 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { RandomUtil } from "../utils/RandomUtil";
export declare class BotWeaponGenerator {
private logger;
private hashUtil;
private databaseServer;
private itemHelper;
private weightedRandomHelper;
private botGeneratorHelper;
private randomUtil;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected weightedRandomHelper: WeightedRandomHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected randomUtil: RandomUtil;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
generateWeapon(equipmentSlot: string, weaponPool: Record<string, number>, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
/** Checks if all required slots are occupied on a weapon and all it's mods */
private isWeaponValid;
protected isWeaponValid(itemList: Item[]): boolean;
/**
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
* Additionally, adds extra bullets to SecuredContainer
@ -29,8 +31,8 @@ export declare class BotWeaponGenerator {
* @param {*} ammoTpl
* @returns
*/
private generateExtraMagazines;
private addBullets;
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
protected addBullets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void;
/**
* Finds and returns tpl of ammo that should be used, while making sure it's compatible
*
@ -38,7 +40,7 @@ export declare class BotWeaponGenerator {
* @param {*} weaponTemplate
* @returns
*/
private getCompatibleAmmo;
protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
/** Fill existing magazines to full, while replacing their contents with specified ammo */
private fillExistingMagazines;
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
}

View File

@ -1,44 +1,46 @@
import { RandomUtil } from "../utils/RandomUtil";
import { IStaticContainerProps, IStaticLootDetails, IStaticAmmoDetails, IStaticForcedProps } from "../models/eft/common/tables/ILootBase";
import { ContainerHelper } from "../helpers/ContainerHelper";
import { GameEventHelper } from "../helpers/GameEventHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
import { ILooseLoot, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
import { Item } from "../models/eft/common/tables/IItem";
import { ItemHelper } from "../helpers/ItemHelper";
import { GameEventHelper } from "../helpers/GameEventHelper";
import { ContainerHelper } from "../helpers/ContainerHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { JsonUtil } from "../utils/JsonUtil";
import { MathUtil } from "../utils/MathUtil";
import { ObjectId } from "../utils/ObjectId";
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
export interface IContainerItem {
items: Item[];
width: number;
height: number;
}
export declare class LocationGenerator {
private logger;
private jsonUtil;
private objectId;
private randomUtil;
private ragfairServerHelper;
private itemHelper;
private mathUtil;
private gameEventHelper;
private containerHelper;
private presetHelper;
private configServer;
private locationConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected objectId: ObjectId;
protected randomUtil: RandomUtil;
protected ragfairServerHelper: RagfairServerHelper;
protected itemHelper: ItemHelper;
protected mathUtil: MathUtil;
protected gameEventHelper: GameEventHelper;
protected containerHelper: ContainerHelper;
protected presetHelper: PresetHelper;
protected configServer: ConfigServer;
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer);
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
private getLooseLootMultiplerForLocation;
private getStaticLootMultiplerForLocation;
protected getLooseLootMultiplerForLocation(location: string): number;
protected getStaticLootMultiplerForLocation(location: string): number;
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
private createItem;
private getRandomCompatibleCaliberTemplateId;
private getRandomValidCaliber;
private drawAmmoTpl;
private createRandomMagCartridges;
private createCartidges;
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item;
}

View File

@ -1,13 +1,14 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { IBotConfig } from "../models/spt/config/IBotConfig";
export declare class PMCLootGenerator {
private itemHelper;
private databaseServer;
private configServer;
private pocketLootPool;
private backpackLootPool;
private botConfig;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected configServer: ConfigServer;
protected pocketLootPool: string[];
protected backpackLootPool: string[];
protected botConfig: IBotConfig;
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
generatePMCPocketLootPool(): string[];
generatePMCBackpackLootPool(): string[];

View File

@ -1,17 +1,25 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { Item } from "../models/eft/common/tables/IItem";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "../helpers/ItemHelper";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairAssortGenerator {
private jsonUtil;
private hashUtil;
private itemHelper;
private databaseServer;
private generatedAssortItems;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected generatedAssortItems: Item[];
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer);
/**
* Get an array of unique items that can be sold on the flea
* @returns array of unique items
*/
getAssortItems(): Item[];
private assortsAreGenerated;
private generateRagfairAssortItems;
private createRagfairAssortItem;
protected assortsAreGenerated(): boolean;
/**
* Generate an array of items the flea can sell
* @returns array of unique items
*/
protected generateRagfairAssortItems(): Item[];
protected createRagfairAssortItem(tplId: string, id?: string): Item;
}

View File

@ -1,49 +1,58 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer";
import { ItemHelper } from "../helpers/ItemHelper";
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 } from "../models/eft/ragfair/IRagfairOffer";
import { Item } from "../models/eft/common/tables/IItem";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { FenceService } from "../services/FenceService";
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 { PresetHelper } from "../helpers/PresetHelper";
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
import { ItemHelper } from "../helpers/ItemHelper";
import { RagfairOfferService } from "../services/RagfairOfferService";
import { RagfairPriceService } from "../services/RagfairPriceService";
import { FenceService } from "../services/FenceService";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairOfferGenerator {
private logger;
private jsonUtil;
private hashUtil;
private randomUtil;
private timeUtil;
private databaseServer;
private ragfairServerHelper;
private saveServer;
private presetHelper;
private ragfairAssortGenerator;
private ragfairOfferService;
private ragfairPriceService;
private fenceService;
private itemHelper;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected ragfairServerHelper: RagfairServerHelper;
protected saveServer: SaveServer;
protected presetHelper: PresetHelper;
protected ragfairAssortGenerator: RagfairAssortGenerator;
protected ragfairOfferService: RagfairOfferService;
protected ragfairPriceService: RagfairPriceService;
protected fenceService: FenceService;
protected itemHelper: ItemHelper;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
private getTraderId;
private getRating;
private getRatingGrowing;
private getOfferEndTime;
protected getTraderId(userID: string): string;
protected getRating(userID: string): number;
protected getRatingGrowing(userID: string): boolean;
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
*/
generateDynamicOffers(expiredOffers?: Item[]): void;
generateTraderOffers(traderID: string): void;
private getItemCondition;
private addMissingCondition;
private getOfferRequirements;
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
protected addMissingCondition(item: Item): Item;
protected getOfferRequirements(items: Item[]): {
count: number;
_tpl: string;
}[];
/**
* Create a flea offer and store it in the Ragfair server offers array
*/

View File

@ -1,19 +1,20 @@
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { ConfigServer } from "../servers/ConfigServer";
import { IWeatherData } from "../models/eft/weather/IWeatherData";
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class WeatherGenerator {
private weightedRandomHelper;
private randomUtil;
private timeUtil;
private configServer;
private weatherConfig;
protected weightedRandomHelper: WeightedRandomHelper;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected configServer: ConfigServer;
protected weatherConfig: IWeatherConfig;
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
calculateTime(data: IWeatherData): IWeatherData;
generateWeather(data: IWeatherData): IWeatherData;
private getWeightedFog;
private getWeightedRain;
private getRandomFloat;
private getRandomInt;
protected getWeightedFog(): string;
protected getWeightedRain(): number;
protected getRandomFloat(node: string): number;
protected getRandomInt(node: string): number;
}

View File

@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "./ItemHelper";
import { QuestHelper } from "./QuestHelper";
export declare class AssortHelper {
private logger;
private itemHelper;
private databaseServer;
private questHelper;
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): 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): ITraderAssort;
stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
}

View File

@ -1,8 +1,9 @@
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
import { Item, Upd } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
import { Grid, ITemplateItem, Slot } 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";
@ -12,18 +13,18 @@ import { RandomUtil } from "../utils/RandomUtil";
import { ContainerHelper } from "./ContainerHelper";
import { InventoryHelper } from "./InventoryHelper";
import { ItemHelper } from "./ItemHelper";
declare class BotGeneratorHelper {
private logger;
private jsonUtil;
private hashUtil;
private randomUtil;
private databaseServer;
private durabilityLimitsHelper;
private itemHelper;
private inventoryHelper;
private containerHelper;
private configServer;
private botConfig;
export declare class BotGeneratorHelper {
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected durabilityLimitsHelper: DurabilityLimitsHelper;
protected itemHelper: ItemHelper;
protected inventoryHelper: InventoryHelper;
protected containerHelper: ContainerHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[];
/**
@ -37,16 +38,50 @@ declare class BotGeneratorHelper {
* @param {string} parentId The CylinderMagazine's UID
* @param {object} parentTemplate The CylinderMagazine's template
*/
private fillCamora;
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
"upd"?: Upd;
upd?: Upd;
};
private getModTplFromItemDb;
/**
* 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;
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/**
* Sort by spawn chance, highest to lowest, higher is more common
* @param unsortedModArray String array to sort
* @returns Sorted string array
*/
protected sortModArray(unsortedModArray: string[]): string[];
/**
* Can an item be added to an item without issue
* @param items
* @param tplToCheck
* @param equipmentSlot
* @returns true if possible
*/
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
/** Adds an item with all its childern into specified equipmentSlots, wherever it fits.
* Returns a `boolean` indicating success. */
/**
* 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: PmcInventory): boolean;
private itemAllowedInContainer;
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
}
export declare class ExhaustableArray<T> {
private itemPool;
@ -58,22 +93,3 @@ export declare class ExhaustableArray<T> {
getFirstValue(): T;
hasValues(): boolean;
}
declare namespace BotGeneratorHelper {
enum EquipmentSlots {
HEADWEAR = "Headwear",
EARPIECE = "Earpiece",
FACE_COVER = "FaceCover",
ARMOR_VEST = "ArmorVest",
EYEWEAR = "Eyewear",
ARM_BAND = "ArmBand",
TACTICAL_VEST = "TacticalVest",
POCKETS = "Pockets",
BACKPACK = "Backpack",
SECURED_CONTAINER = "SecuredContainer",
FIRST_PRIMARY_WEAPON = "FirstPrimaryWeapon",
SECOND_PRIMARY_WEAPON = "SecondPrimaryWeapon",
HOLSTER = "Holster",
SCABBARD = "Scabbard"
}
}
export { BotGeneratorHelper };

View File

@ -1,22 +1,44 @@
import { DatabaseServer } from "../servers/DatabaseServer";
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 { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class BotHelper {
private logger;
private jsonUtil;
private databaseServer;
private randomUtil;
private configServer;
private botConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected randomUtil: RandomUtil;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
/**
* Randomise the chance the PMC will attack their own side
* @param difficultySettings pmc difficulty settings
*/
randomisePmcHostility(difficultySettings: Difficulty): void;
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
* @param difficultySettings bot settings to alter
* @param typesToAdd bot type to add to enemy list
*/
addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: 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;
}

View File

@ -6,7 +6,7 @@ export declare class FindSlotResult {
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
}
export declare class ContainerHelper {
private locateSlot;
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;
}

View File

@ -1,17 +1,18 @@
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
import { MessageType } from "../models/enums/MessageType";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { ItemHelper } from "./ItemHelper";
import { Dialogue, MessageContent, MessagePreview, MessageType } from "../models/eft/profile/IAkiProfile";
import { HashUtil } from "../utils/HashUtil";
import { NotifierHelper } from "./NotifierHelper";
import { ItemHelper } from "./ItemHelper";
import { NotificationSendHelper } from "./NotificationSendHelper";
import { NotifierHelper } from "./NotifierHelper";
export declare class DialogueHelper {
private hashUtil;
private saveServer;
private databaseServer;
private notifierHelper;
private notificationSendHelper;
private itemHelper;
protected hashUtil: HashUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper;
protected notificationSendHelper: NotificationSendHelper;
protected itemHelper: ItemHelper;
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;

View File

@ -1,25 +1,26 @@
import { ConfigServer } from "../servers/ConfigServer";
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 {
private randomUtil;
private botHelper;
private configServer;
private botConfig;
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;
private generateMaxWeaponDurability;
private generateMaxPmcArmorDurability;
private getLowestMaxWeaponFromConfig;
private getHighestMaxWeaponDurabilityFromConfig;
private generateWeaponDurability;
private generateArmorDurability;
private getMinWeaponDeltaFromConfig;
private getMaxWeaponDeltaFromConfig;
private getMinArmorDeltaFromConfig;
private getMaxArmorDeltaFromConfig;
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;
}

View File

@ -1,5 +1,5 @@
import { BotGenerator } from "../generators/BotGenerator";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IPmcData, Skills, Stats } from "../models/eft/common/IPmcData";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { FenceService } from "../services/FenceService";
@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark";
import { ItemHelper } from "./ItemHelper";
import { ProfileHelper } from "./ProfileHelper";
export declare class ExtendedProfileHelper extends ProfileHelper {
private botGenerator;
protected botGenerator: BotGenerator;
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator);
generatePlayerScav(sessionID: string): IPmcData;
private getScavSkills;
private removeSecureContainer;
private getDefaultScavSkills;
private getScavStats;
private getScavLevel;
private getScavExperience;
private setScavCooldownTimer;
protected getScavSkills(sessionID: string): Skills;
protected removeSecureContainer(profile: IPmcData): IPmcData;
protected getDefaultScavSkills(): Skills;
protected getScavStats(sessionID: string): Stats;
protected getScavLevel(sessionID: string): number;
protected getScavExperience(sessionID: string): number;
protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData;
}

View File

@ -1,6 +1,6 @@
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class GameEventHelper {
private databaseServer;
protected databaseServer: DatabaseServer;
constructor(databaseServer: DatabaseServer);
get EVENT(): Record<string, string>;
get christmasEventItems(): string[];

View File

@ -9,7 +9,7 @@ export declare class LookupCollection {
constructor();
}
export declare class HandbookHelper {
private lookup;
protected lookup: LookupCollection;
hydrateLookup(lookup: LookupCollection): void;
getTemplatePrice(x: string): number;
templatesWithParent(x: string): string[];

View File

@ -1,23 +1,27 @@
import { SaveServer } from "../servers/SaveServer";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthHelper {
private jsonUtil;
private logger;
private timeUtil;
private saveServer;
private configServer;
private healthConfig;
protected jsonUtil: JsonUtil;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected saveServer: SaveServer;
protected configServer: ConfigServer;
protected healthConfig: IHealthConfig;
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
resetVitality(sessionID: string): IAkiProfile;
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
private saveHealth;
private saveEffects;
private addEffect;
private isEmpty;
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
protected saveEffects(pmcData: IPmcData, sessionID: string): void;
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
bodyPart: string;
effectType: string;
}): void;
protected isEmpty(map: any): boolean;
}

View File

@ -1,10 +1,12 @@
import { IPmcData, Production, Productive } from "../models/eft/common/IPmcData";
import { Common, HideoutArea, IPmcData, Production, Productive } from "../models/eft/common/IPmcData";
import { Upd } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil";
import { InventoryHelper } from "./InventoryHelper";
import { ProfileHelper } from "./ProfileHelper";
export declare class HideoutHelper {
private logger;
private hashUtil;
private timeUtil;
private randomUtil;
private databaseServer;
private itemEventRouter;
private httpResponse;
private profileHelper;
private inventoryHelper;
private playerService;
private configServer;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected itemEventRouter: ItemEventRouter;
protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper;
protected inventoryHelper: InventoryHelper;
protected playerService: PlayerService;
protected configServer: ConfigServer;
static BITCOIN_FARM: string;
private WATER_COLLECTOR;
private BITCOIN;
private EXPEDITIONARY_FUEL_TANK;
protected WATER_COLLECTOR: string;
protected BITCOIN: string;
protected EXPEDITIONARY_FUEL_TANK: string;
static NAME_BACKENDCOUNTERS_CRAFTING: string;
static SKILL_NAME_HIDEOUT: string;
static HOUR_FOR_SKILL_CRAFTING: number;
static SKILL_NAME_CRAFITING: string;
private hideoutConfig;
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer);
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
@ -46,18 +48,20 @@ export declare class HideoutHelper {
initProduction(recipeId: string, productionTime: number): Production;
isProductionType(productive: Productive): productive is Production;
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
private applySkillXPBoost;
protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void;
updatePlayerHideout(sessionID: string): void;
private updateFuel;
private updateWaterFilters;
private getAreaUpdObject;
private updateAirFilters;
private updateBitcoinFarm;
private getBTCSlots;
private getManagementSkillsSlots;
private hasManagementSkillSlots;
private getHideoutManagementSkill;
private getHideoutManagementConsumptionBonus;
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea;
protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea;
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
protected getBTCSlots(pmcData: IPmcData): number;
protected getManagementSkillsSlots(): number;
protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
isProduction(productive: Productive): productive is Production;
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;

View File

@ -1,8 +1,19 @@
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ConfigServer } from "../servers/ConfigServer";
export declare class HttpServerHelper {
private configServer;
private httpConfig;
private mime;
protected configServer: ConfigServer;
protected httpConfig: IHttpConfig;
protected mime: {
css: string;
bin: string;
html: string;
jpg: string;
js: string;
json: string;
png: string;
svg: string;
txt: string;
};
constructor(configServer: ConfigServer);
getMimeText(key: string): string;
buildUrl(): string;

View File

@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil";
import { InventoryHelper } from "./InventoryHelper";
import { PaymentHelper } from "./PaymentHelper";
export declare class InRaidHelper {
private logger;
private saveServer;
private jsonUtil;
private databaseServer;
private inventoryHelper;
private paymentHelper;
protected logger: ILogger;
protected saveServer: SaveServer;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected inventoryHelper: InventoryHelper;
protected paymentHelper: PaymentHelper;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
private removePlayer;
private removeMapAccessKey;
protected removePlayer(sessionID: string): void;
protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void;
addUpdToMoneyFromRaid(items: Item[]): void;
/**
* Add positive karma for PMC kills

View File

@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
@ -25,26 +26,26 @@ export interface OwnerInventoryItems {
isMail: boolean;
}
export declare class InventoryHelper {
private logger;
private jsonUtil;
private hashUtil;
private httpResponse;
private fenceService;
private databaseServer;
private paymentHelper;
private traderAssortHelper;
private dialogueHelper;
private itemHelper;
private containerHelper;
private profileHelper;
private configServer;
private inventoryConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected httpResponse: HttpResponseUtil;
protected fenceService: FenceService;
protected databaseServer: DatabaseServer;
protected paymentHelper: PaymentHelper;
protected traderAssortHelper: TraderAssortHelper;
protected dialogueHelper: DialogueHelper;
protected itemHelper: ItemHelper;
protected containerHelper: ContainerHelper;
protected profileHelper: ProfileHelper;
protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
private getSizeByInventoryItemHash;
private getInventoryItemHash;
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
/**
* Based on the item action, determine whose inventories we should be looking at for from and to.
@ -56,9 +57,9 @@ export declare class InventoryHelper {
* @param {string} sessionID
* @returns Array
*/
private getStashSlotMap;
private getStashType;
private getPlayerStashSize;
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
protected getStashType(sessionID: string): string;
protected getPlayerStashSize(sessionID: string): Record<number, number>;
/**
* Internal helper function to transfer an item from one profile to another.
* fromProfileData: Profile of the source.
@ -73,5 +74,12 @@ export declare class InventoryHelper {
/**
* Internal helper function to handle cartridges in inventory if any of them exist.
*/
private handleCartridges;
protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
}
declare namespace InventoryHelper {
interface InventoryItemHash {
byItemId: Record<string, Item>;
byParentId: Record<string, Item[]>;
}
}
export {};

View File

@ -1,15 +1,15 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { ILogger } from "../models/spt/utils/ILogger";
declare class ItemHelper {
private logger;
private hashUtil;
private jsonUtil;
private databaseServer;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer);
/**
* Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash
@ -139,98 +139,9 @@ declare class ItemHelper {
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
}
declare namespace ItemHelper {
enum BaseClasses {
WEAPON = "5422acb9af1c889c16000029",
ARMOR = "5448e54d4bdc2dcc718b4568",
VEST = "5448e5284bdc2dcb718b4567",
BACKPACK = "5448e53e4bdc2d60728b4567",
VISORS = "5448e5724bdc2ddf718b4568",
FOOD = "5448e8d04bdc2ddf718b4569",
DRINK = "5448e8d64bdc2dce718b4568",
BARTER_ITEM = "5448eb774bdc2d0a728b4567",
INFO = "5448ecbe4bdc2d60728b4568",
MEDKIT = "5448f39d4bdc2d0a728b4568",
DRUGS = "5448f3a14bdc2d27728b4569",
STIMULATOR = "5448f3a64bdc2d60728b456a",
MEDICAL = "5448f3ac4bdc2dce718b4569",
MEDICAL_SUPPLIES = "57864c8c245977548867e7f1",
MOD = "5448fe124bdc2da5018b4567",
FUNCTIONAL_MOD = "550aa4154bdc2dd8348b456b",
FUEL = "5d650c3e815116009f6201d2",
GEAR_MOD = "55802f3e4bdc2de7118b4584",
STOCK = "55818a594bdc2db9688b456a",
FOREGRIP = "55818af64bdc2d5b648b4570",
MASTER_MOD = "55802f4a4bdc2ddb688b4569",
MOUNT = "55818b224bdc2dde698b456f",
MUZZLE = "5448fe394bdc2d0d028b456c",
SIGHTS = "5448fe7a4bdc2d6f028b456b",
MEDS = "543be5664bdc2dd4348b4569",
MONEY = "543be5dd4bdc2deb348b4569",
KEY = "543be5e94bdc2df1348b4568",
KEY_MECHANICAL = "5c99f98d86f7745c314214b3",
KEYCARD = "5c164d2286f774194c5e69fa",
EQUIPMENT = "543be5f84bdc2dd4348b456a",
THROW_WEAPON = "543be6564bdc2df4348b4568",
FOOD_DRINK = "543be6674bdc2df1348b4569",
PISTOL = "5447b5cf4bdc2d65278b4567",
SMG = "5447b5e04bdc2d62278b4567",
ASSAULT_RIFLE = "5447b5f14bdc2d61278b4567",
ASSAULT_CARBINE = "5447b5fc4bdc2d87278b4567",
SHOTGUN = "5447b6094bdc2dc3278b4567",
MARKSMAN_RIFLE = "5447b6194bdc2d67278b4567",
SNIPER_RIFLE = "5447b6254bdc2dc3278b4568",
MACHINE_GUN = "5447bed64bdc2d97278b4568",
GRENADE_LAUNCHER = "5447bedf4bdc2d87278b4568",
SPECIAL_WEAPON = "5447bee84bdc2dc3278b4569",
SPEC_ITEM = "5447e0e74bdc2d3c308b4567",
KNIFE = "5447e1d04bdc2dff2f8b4567",
AMMO = "5485a8684bdc2da71d8b4567",
AMMO_BOX = "543be5cb4bdc2deb348b4568",
LOOT_CONTAINER = "566965d44bdc2d814c8b4571",
MOD_CONTAINER = "5448bf274bdc2dfc2f8b456a",
SEARCHABLE_ITEM = "566168634bdc2d144c8b456c",
STASH = "566abbb64bdc2d144c8b457d",
SORTING_TABLE = "6050cac987d3f925bf016837",
LOCKABLE_CONTAINER = "5671435f4bdc2d96058b4569",
SIMPLE_CONTAINER = "5795f317245977243854e041",
INVENTORY = "55d720f24bdc2d88028b456d",
STATIONARY_CONTAINER = "567583764bdc2d98058b456e",
POCKETS = "557596e64bdc2dc2118b4571",
ARMBAND = "5b3f15d486f77432d0509248",
DOG_TAG_USEC = "59f32c3b86f77472a31742f0",
DOG_TAG_BEAR = "59f32bb586f774757e1e8442",
JEWELRY = "57864a3d24597754843f8721",
ELECTRONICS = "57864a66245977548f04a81f",
BUILDING_MATERIAL = "57864ada245977548638de91",
TOOL = "57864bb7245977548b3b66c2",
HOUSEHOLD_GOODS = "57864c322459775490116fbf",
LUBRICANT = "57864e4c24597754843f8723",
BATTERY = "57864ee62459775490116fc1",
ASSAULT_SCOPE = "55818add4bdc2d5b648b456f",
REFLEX_SIGHT = "55818ad54bdc2ddc698b4569",
TACTICAL_COMBO = "55818b164bdc2ddc698b456c",
MAGAZINE = "5448bc234bdc2d3c308b4569",
LIGHT_LASER = "55818b0e4bdc2dde698b456e",
FLASH_HIDER = "550aa4bf4bdc2dd6348b456b",
COLLIMATOR = "55818ad54bdc2ddc698b4569",
COMPACT_COLLIMATOR = "55818acf4bdc2dde698b456b",
COMPENSATOR = "550aa4af4bdc2dd4348b456e",
OPTIC_SCOPE = "55818ae44bdc2dde698b456c",
SPECIAL_SCOPE = "55818aeb4bdc2ddc698b456a",
OTHER = "590c745b86f7743cc433c5f2",
SILENCER = "550aa4cd4bdc2dd8348b456c",
PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc",
ITEM = "54009119af1c881c07000029",
CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25"
}
interface ItemSize {
width: number;
height: number;
}
enum Money {
ROUBLES = "5449016a4bdc2d6f028b456f",
EUROS = "569668774bdc2da2298b4568",
DOLLARS = "5696686a4bdc2da3298b456a"
}
}
export { ItemHelper };

View File

@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier";
import { IHttpServer } from "../models/spt/server/IHttpServer";
import { NotificationService } from "../services/NotificationService";
export declare class NotificationSendHelper {
private httpServer;
private notificationService;
protected httpServer: IHttpServer;
protected notificationService: NotificationService;
constructor(httpServer: IHttpServer, notificationService: NotificationService);
/**
* Send notification message to the appropiate channel

View File

@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier";
import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile";
import { HttpServerHelper } from "./HttpServerHelper";
export declare class NotifierHelper {
private httpServerHelper;
protected httpServerHelper: HttpServerHelper;
/**
* The default notification sent when waiting times out.
*/
private defaultNotification;
protected defaultNotification: INotification;
constructor(httpServerHelper: HttpServerHelper);
getDefaultNotification(): INotification;
/** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */

View File

@ -1,8 +1,8 @@
import { Preset } from "../models/eft/common/IGlobals";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class PresetHelper {
private databaseServer;
private lookup;
protected databaseServer: DatabaseServer;
protected lookup: Record<string, string[]>;
constructor(databaseServer: DatabaseServer);
hydratePresetStore(input: Record<string, string[]>): void;
isPreset(id: string): boolean;

View File

@ -28,6 +28,6 @@ export declare class ProfileHelper {
getPmcProfile(sessionID: string): IPmcData;
getScavProfile(sessionID: string): IPmcData;
getDefaultCounters(): Stats;
private isWiped;
private getServerVersion;
protected isWiped(sessionID: string): boolean;
protected getServerVersion(): string;
}

View File

@ -3,5 +3,5 @@ export declare class QuestConditionHelper {
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
private filterConditions;
protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
}

View File

@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { TraderHelper } from "./TraderHelper";
export declare class QuestHelper {
private logger;
private jsonUtil;
private timeUtil;
private hashUtil;
private itemHelper;
private itemEventRouter;
private databaseServer;
private ragfairServerHelper;
private dialogueHelper;
private profileHelper;
private paymentHelper;
private traderHelper;
private configServer;
private questConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected ragfairServerHelper: RagfairServerHelper;
protected dialogueHelper: DialogueHelper;
protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper;
protected traderHelper: TraderHelper;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
static get STATUS(): Record<string, number>;
questStatus(pmcData: IPmcData, questID: string): string;
@ -47,7 +48,7 @@ export declare class QuestHelper {
*/
dumpQuests(quests: any, label?: any): void;
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
private processReward;
protected processReward(reward: Reward): any[];
getQuestRewardItems(quest: IQuest, state: string): Reward[];
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
@ -58,7 +59,7 @@ export declare class QuestHelper {
* Get List of All Quests as an array
*/
questValues(): IQuest[];
private cleanQuestList;
protected cleanQuestList(quests: IQuest[]): IQuest[];
cleanQuestConditions(quest: IQuest): IQuest;
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;

View File

@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper";
import { TraderAssortHelper } from "./TraderAssortHelper";
import { UtilityHelper } from "./UtilityHelper";
export declare class RagfairHelper {
private logger;
private jsonUtil;
private traderAssortHelper;
private databaseServer;
private handbookHelper;
private itemHelper;
private ragfairLinkedItemService;
private utilityHelper;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected traderAssortHelper: TraderAssortHelper;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper;
protected ragfairLinkedItemService: RagfairLinkedItemService;
protected utilityHelper: UtilityHelper;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
/**
* Gets currency TAG from TPL
@ -31,7 +32,7 @@ export declare class RagfairHelper {
getCurrencyTag(currency: string): string;
filterCategories(sessionID: string, info: ISearchRequestData): string[];
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
private getCategoryList;
protected getCategoryList(handbookId: string): string[];
countCategories(result: IGetOffersResult): void;
/**
* Merges Root Items

View File

@ -1,7 +1,10 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { RagfairSortHelper } from "./RagfairSortHelper";
export declare class RagfairOfferHelper {
private logger;
private timeUtil;
private hashUtil;
private itemEventRouter;
private databaseServer;
private saveServer;
private dialogueHelper;
private itemHelper;
private paymentHelper;
private presetHelper;
private profileHelper;
private ragfairServerHelper;
private ragfairSortHelper;
private ragfairHelper;
private ragfairOfferService;
private configServer;
private static TPL_GOODS_SOLD;
private ragfairConfig;
private questConfig;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected saveServer: SaveServer;
protected dialogueHelper: DialogueHelper;
protected itemHelper: ItemHelper;
protected paymentHelper: PaymentHelper;
protected presetHelper: PresetHelper;
protected profileHelper: ProfileHelper;
protected ragfairServerHelper: RagfairServerHelper;
protected ragfairSortHelper: RagfairSortHelper;
protected ragfairHelper: RagfairHelper;
protected ragfairOfferService: RagfairOfferService;
protected configServer: ConfigServer;
protected static TPL_GOODS_SOLD: string;
protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, configServer: ConfigServer);
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
processOffers(sessionID: string): boolean;
private getProfileOffers;
private deleteOfferByOfferId;
private completeOffer;
protected getProfileOffers(sessionID: string): IRagfairOffer[];
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
}

View File

@ -1,14 +1,15 @@
import { SellResult } from "../models/eft/ragfair/IRagfairOffer";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
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 RagfairSellHelper {
private logger;
private randomUtil;
private timeUtil;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number;
rollForSale(sellChance: number, count: number): SellResult[];

View File

@ -1,6 +1,8 @@
import { MemberCategory } from "../models/eft/common/MemberCategory";
import { MemberCategory } from "../models/enums/MemberCategory";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
@ -11,21 +13,26 @@ import { DialogueHelper } from "./DialogueHelper";
import { ItemHelper } from "./ItemHelper";
import { ProfileHelper } from "./ProfileHelper";
export declare class RagfairServerHelper {
private randomUtil;
private hashUtil;
private saveServer;
private databaseServer;
private profileHelper;
private itemHelper;
private dialogueHelper;
private jsonUtil;
private configServer;
private ragfairConfig;
private questConfig;
private static TPL_GOODS_RETURNED;
protected randomUtil: RandomUtil;
protected hashUtil: HashUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected profileHelper: ProfileHelper;
protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper;
protected jsonUtil: JsonUtil;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig;
protected static TPL_GOODS_RETURNED: string;
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, jsonUtil: JsonUtil, configServer: ConfigServer);
/**
* Is item valid / on blacklist / quest item
* @param itemDetails
* @returns boolean
*/
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
isItemBlacklisted(itemTemplateId: string): boolean;
protected isItemBlacklisted(itemTemplateId: string): boolean;
isTrader(userID: string): boolean;
isPlayer(userID: string): boolean;
returnItems(sessionID: string, items: any[]): void;

View File

@ -1,12 +1,12 @@
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class RagfairSortHelper {
private databaseServer;
protected databaseServer: DatabaseServer;
constructor(databaseServer: DatabaseServer);
sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[];
private sortOffersByID;
private sortOffersByRating;
private sortOffersByName;
private sortOffersByPrice;
private sortOffersByExpiry;
protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number;
protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number;
protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number;
protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number;
protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number;
}

View File

@ -1,15 +1,16 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { DatabaseServer } from "../servers/DatabaseServer";
import { RagfairPriceService } from "../services/RagfairPriceService";
import { ItemHelper } from "./ItemHelper";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairTaxHelper {
private logger;
private databaseServer;
private ragfairPriceService;
private itemHelper;
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected ragfairPriceService: RagfairPriceService;
protected itemHelper: ItemHelper;
constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number;
private calculateItemWorth;
protected calculateItemWorth(item: Item, itemTemplate: ITemplateItem, itemCount: number, pmcData: IPmcData, isRootItem?: boolean): number;
}

View File

@ -1,20 +1,22 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { Props } from "../models/eft/common/tables/ITemplateItem";
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RepairHelper {
private logger;
private jsonUtil;
private randomUtil;
private databaseServer;
private configServer;
private repairConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected configServer: ConfigServer;
protected repairConfig: IRepairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item;
private getRandomisedArmorRepairDegredationValue;
private getRandomisedWeaponRepairDegredationValue;
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number;
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number;
isWeaponTemplate(tpl: string): boolean;
}

View File

@ -7,7 +7,7 @@ export interface OwnerInventoryItems {
isMail: boolean;
}
export declare class SecureContainerHelper {
private itemHelper;
protected itemHelper: ItemHelper;
constructor(itemHelper: ItemHelper);
getSecureContainerItems(items: Item[]): string[];
}

View File

@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Upd } from "../models/eft/common/tables/IItem";
import { Item, Upd } from "../models/eft/common/tables/IItem";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData";
@ -12,20 +12,33 @@ import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
export declare class TradeHelper {
private logger;
private itemEventRouter;
private traderHelper;
private itemHelper;
private paymentService;
private fenceService;
private inventoryHelper;
private ragfairServer;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected traderHelper: TraderHelper;
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer);
/**
* Buy item from flea or trader
* @param pmcData
* @param buyRequestData data from client
* @param sessionID
* @param foundInRaid
* @param upd optional item details used when buying from flea
* @returns
*/
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse;
/**
* Selling item to trader
* Sell item to trader
* @param pmcData
* @param body
* @param sessionID
* @returns
*/
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
private incrementAssortBuyCount;
private checkPurchaseIsWithinTraderItemLimit;
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
}

View File

@ -1,7 +1,8 @@
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { ILogger } from "../models/spt/utils/ILogger";
import { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator";
import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator";
import { Item } from "../models/eft/common/tables/IItem";
import { ITraderAssort } 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";
@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil";
import { AssortHelper } from "./AssortHelper";
import { ProfileHelper } from "./ProfileHelper";
export declare class TraderAssortHelper {
private logger;
private jsonUtil;
private databaseServer;
private profileHelper;
private assortHelper;
private ragfairAssortGenerator;
private ragfairOfferGenerator;
private traderAssortService;
private fenceService;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected profileHelper: ProfileHelper;
protected assortHelper: AssortHelper;
protected ragfairAssortGenerator: RagfairAssortGenerator;
protected ragfairOfferGenerator: RagfairOfferGenerator;
protected traderAssortService: TraderAssortService;
protected fenceService: FenceService;
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, fenceService: FenceService);
/**
* Get a traders assorts
* Can be used for returning ragfair / fence assorts
* @param sessionId session id
* @param traderId trader id
* @returns a traders assorts
*/
getAssort(sessionId: string, traderId: string): ITraderAssort;
/**
* Get an array of pristine trader items prior to any alteration by player
* @param traderId trader id
* @returns array of Items
*/
protected getPristineTraderAssorts(traderId: string): Item[];
/**
* Returns generated ragfair offers in a trader assort format
* @returns Trader assort object
*/
protected getRagfairDataAsTraderAssort(): ITraderAssort;
}

Some files were not shown because too many files have changed in this diff Show More