Update types

This commit is contained in:
Chomp 2023-01-28 20:50:35 +00:00
parent 02cb78b918
commit aad0a36b11
145 changed files with 1553 additions and 401 deletions

View File

@ -1,8 +1,11 @@
import { HideoutController } from "../controllers/HideoutController";
import { RagfairController } from "../controllers/RagfairController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGlobals } from "../models/eft/common/IGlobals"; import { IGlobals } from "../models/eft/common/IGlobals";
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem"; import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase"; import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
import { IQuest } from "../models/eft/common/tables/IQuest"; import { IQuest } from "../models/eft/common/tables/IQuest";
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea"; import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase"; import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
@ -17,7 +20,9 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class DataCallbacks { export declare class DataCallbacks {
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer); protected ragfairController: RagfairController;
protected hideoutController: HideoutController;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
/** /**
* Handles client/settings * Handles client/settings
* @returns ISettingsBase * @returns ISettingsBase
@ -56,4 +61,9 @@ export declare class DataCallbacks {
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>; getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>; getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
/**
* Handle client/hideout/qte/list
*/
getQteList(url: string, info: IEmptyRequestData, sessionID: string): string;
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetItemPricesResponse>;
} }

View File

@ -7,6 +7,7 @@ import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealReques
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class HealthCallbacks { export declare class HealthCallbacks {
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
@ -21,6 +22,14 @@ export declare class HealthCallbacks {
* @returns empty response, no data sent back to client * @returns empty response, no data sent back to client
*/ */
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>; syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
/**
* Custom aki server request found in modules/QTEPatch.cs
* @param url
* @param info HealthListener.Instance.CurrentHealth class
* @param sessionID session id
* @returns empty response, no data sent back to client
*/
handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData<string>;
/** /**
* Handle Eat * Handle Eat
* @returns IItemEventRouterResponse * @returns IItemEventRouterResponse

View File

@ -1,7 +1,9 @@
import { HideoutController } from "../controllers/HideoutController"; import { HideoutController } from "../controllers/HideoutController";
import { OnUpdate } from "../di/OnUpdate"; import { OnUpdate } from "../di/OnUpdate";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
@ -10,6 +12,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
@ -21,76 +24,52 @@ export declare class HideoutCallbacks extends OnUpdate {
configServer: ConfigServer); configServer: ConfigServer);
/** /**
* Handle HideoutUpgrade * Handle HideoutUpgrade
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutUpgradeComplete * Handle HideoutUpgradeComplete
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutPutItemsInAreaSlots * Handle HideoutPutItemsInAreaSlots
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutTakeItemsFromAreaSlots * Handle HideoutTakeItemsFromAreaSlots
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutToggleArea * Handle HideoutToggleArea
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutSingleProductionStart * Handle HideoutSingleProductionStart
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutScavCaseProductionStart * Handle HideoutScavCaseProductionStart
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutContinuousProductionStart * Handle HideoutContinuousProductionStart
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handle HideoutTakeProduction * Handle HideoutTakeProduction
* @param pmcData
* @param body
* @param sessionID
* @returns
*/ */
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutQuickTimeEvent
*/
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
/**
* Handle client/game/profile/items/moving - RecordShootingRangePoints
*/
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
/**
* Handle client/game/profile/items/moving - RecordShootingRangePoints
*/
improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse;
onUpdate(timeSinceLastRun: number): Promise<boolean>; onUpdate(timeSinceLastRun: number): Promise<boolean>;
getRoute(): string; getRoute(): string;
} }

View File

@ -7,10 +7,10 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData"; import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData"; import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData"; import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData"; import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -41,6 +41,6 @@ export declare class MatchCallbacks {
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>; getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>; createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
} }

View File

@ -33,10 +33,14 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
getRoute(): string; getRoute(): string;
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>; search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>; getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse; removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle /client/items/prices
* Called when clicking an item to list on flea
*/
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
onUpdate(timeSinceLastRun: number): Promise<boolean>; onUpdate(timeSinceLastRun: number): Promise<boolean>;
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData; sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
} }

View File

@ -2,7 +2,7 @@ export declare enum ContextVariableType {
/** Logged in users session id */ /** Logged in users session id */
SESSION_ID = 0, SESSION_ID = 0,
/** Currently acive raid information */ /** Currently acive raid information */
MATCH_INFO = 1, RAID_CONFIGURATION = 1,
/** Timestamp when client first connected */ /** Timestamp when client first connected */
CLIENT_START_TIMESTAMP = 2, CLIENT_START_TIMESTAMP = 2,
/** When player is loading into map and loot is requested */ /** When player is loading into map and loot is requested */

View File

@ -3,7 +3,6 @@ import { BotGenerator } from "../generators/BotGenerator";
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper"; import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
import { BotHelper } from "../helpers/BotHelper"; import { BotHelper } from "../helpers/BotHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { IBotCore } from "../models/eft/common/tables/IBotCore";
@ -23,14 +22,13 @@ export declare class BotController {
protected botDifficultyHelper: BotDifficultyHelper; protected botDifficultyHelper: BotDifficultyHelper;
protected botGenerationCacheService: BotGenerationCacheService; protected botGenerationCacheService: BotGenerationCacheService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected weightedRandomHelper: WeightedRandomHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
static readonly pmcTypeLabel = "PMC"; static readonly pmcTypeLabel = "PMC";
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil); constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
/** /**
* Return the number of bot loadout varieties to be generated * Return the number of bot loadout varieties to be generated
* @param type bot Type we want the loadout gen count for * @param type bot Type we want the loadout gen count for

View File

@ -1,4 +1,5 @@
import { ApplicationContext } from "../context/ApplicationContext"; import { ApplicationContext } from "../context/ApplicationContext";
import { HideoutHelper } from "../helpers/HideoutHelper";
import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { PreAkiModLoader } from "../loaders/PreAkiModLoader"; import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
@ -10,27 +11,44 @@ import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { LocalisationService } from "../services/LocalisationService"; import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService"; import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService"; import { SeasonalEventService } from "../services/SeasonalEventService";
import { TimeUtil } from "../utils/TimeUtil";
export declare class GameController { export declare class GameController {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected timeUtil: TimeUtil;
protected preAkiModLoader: PreAkiModLoader; protected preAkiModLoader: PreAkiModLoader;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
protected hideoutHelper: HideoutHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/**
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
*/
protected fixBrokenOfflineMapWaves(): void;
/**
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
*/
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
/** /**
* Get a list of installed mods and save their details to the profile being used * Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to * @param fullProfile Profile to add mod details to

View File

@ -2,6 +2,7 @@ import { HealthHelper } from "../helpers/HealthHelper";
import { InventoryHelper } from "../helpers/InventoryHelper"; import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData"; import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
@ -36,6 +37,13 @@ export declare class HealthController {
* @returns * @returns
*/ */
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Consume food/water outside of a raid
* @param pmcData Player profile
* @param body request Object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
@ -45,6 +53,13 @@ export declare class HealthController {
* @returns * @returns
*/ */
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
/**
* applies skills from hideout workout.
* @param pmcData Player profile
* @param info Request data
* @param sessionID
*/
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
/** /**
* iterate over treatment request diff and find effects to remove from player limbs * iterate over treatment request diff and find effects to remove from player limbs
* @param sessionId * @param sessionId

View File

@ -7,7 +7,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase"; import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData"; import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData"; import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
@ -16,6 +18,8 @@ import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTa
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData"; import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData"; import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IQteData } from "../models/eft/hideout/IQteData";
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -52,8 +56,22 @@ export declare class HideoutController {
protected static nameBackendCountersCrafting: string; protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; /**
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse; * Start a hideout area upgrade
* @param pmcData Player profile
* @param request upgrade start request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Complete a hideout area upgrade
* @param pmcData Player profile
* @param request Completed upgrade request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Create item in hideout slot item array, remove item from player inventory * Create item in hideout slot item array, remove item from player inventory
* @param pmcData Profile data * @param pmcData Profile data
@ -62,7 +80,14 @@ export declare class HideoutController {
* @returns IItemEventRouterResponse object * @returns IItemEventRouterResponse object
*/ */
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse; putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse; /**
* Remove item from hideout area and place into player inventory
* @param pmcData Player profile
* @param request Take item out of area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
takeItemsFromAreaSlots(pmcData: IPmcData, request: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot * Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
* @param sessionID Session id * @param sessionID Session id
@ -73,7 +98,21 @@ export declare class HideoutController {
* @returns IItemEventRouterResponse response * @returns IItemEventRouterResponse response
*/ */
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse; protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; /**
* Toggle area on/off
* @param pmcData Player profile
* @param request Toggle area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Start production for an item from hideout area
* @param pmcData Player profile
* @param body Start prodution of single item request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse; singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles event after clicking 'start' on the scav case hideout page * Handles event after clicking 'start' on the scav case hideout page
@ -87,20 +126,84 @@ export declare class HideoutController {
* Add generated scav case rewards to player profile * Add generated scav case rewards to player profile
* @param pmcData player profile to add rewards to * @param pmcData player profile to add rewards to
* @param rewards reward items to add to profile * @param rewards reward items to add to profile
* @param recipieId recipie id to save into Production dict
*/ */
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void; protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; /**
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; * Start production of continuously created item
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; * @param pmcData Player profile
* @param request Continious production request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Take completed item out of hideout area and place into player inventory
* @param pmcData Player profile
* @param request Remove production from area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Take recipie-type production out of hideout area and place into player inventory
* @param sessionID Session id
* @param recipe Completed recipie of item
* @param pmcData Player profile
* @param request Remove production from area request
* @param output Output object to update
* @returns IItemEventRouterResponse
*/
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Handles giving rewards stored in player profile to player after clicking 'get rewards' * Handles giving rewards stored in player profile to player after clicking 'get rewards'
* @param sessionID * @param sessionID Session id
* @param pmcData * @param pmcData Player profile
* @param body * @param request Get rewards from scavcase craft request
* @param output * @param output Output object to update
* @returns * @returns IItemEventRouterResponse
*/
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/**
* Start area production for item
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Get quick time event list for hideout
* // TODO - implement this
* @param sessionId Session id
* @returns IQteData array
*/
getQteList(sessionId: string): IQteData[];
/**
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
* Called after completing workout at gym
* @param sessionId Session id
* @param pmcData Profile to adjust
* @param request QTE result object
*/
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
/**
* Record a high score from the shooting range into a player profiles overallcounters
* @param sessionId Session id
* @param pmcData Profile to update
* @param request shooting range score request
* @returns IItemEventRouterResponse
*/
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
/**
* Handle client/game/profile/items/moving - HideoutImproveArea
* @param sessionId Session id
* @param pmcData profile to improve area in
* @param request improve area request data
*/
improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse;
/**
* Function called every x seconds as part of onUpdate event
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
update(): void; update(): void;
} }

View File

@ -31,13 +31,23 @@ export declare class InsuranceController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer); constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
/**
* Process insurance items prior to being given to player in mail
*/
processReturn(): void; processReturn(): void;
/**
* Add insurance to an item
* @param pmcData Player profile
* @param body Insurance request
* @param sessionID Session id
* @returns IItemEventRouterResponse object to send to client
*/
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Calculate insurance cost * Calculate insurance cost
* @param info request object * @param info request object
* @param sessionID session id * @param sessionID session id
* @returns response object to send to client * @returns IGetInsuranceCostResponseData object to send to client
*/ */
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData; cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
} }

View File

@ -129,9 +129,14 @@ export declare class InventoryController {
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string; protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles sorting of Inventory. * Handle ApplyInventoryChanges
* Sorts supplied items.
* @param pmcData Player profile
* @param request sort request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/ */
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse; createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse; deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse; editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -6,10 +6,9 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData"; import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData"; import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult"; import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { BotDifficulty } from "../models/enums/BotDifficulty";
import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IBotConfig } from "../models/spt/config/IBotConfig";
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig";
@ -18,9 +17,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
import { BotLootCacheService } from "../services/BotLootCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { MatchLocationService } from "../services/MatchLocationService"; import { MatchLocationService } from "../services/MatchLocationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
export declare class MatchController { export declare class MatchController {
protected logger: ILogger; protected logger: ILogger;
@ -31,14 +28,12 @@ export declare class MatchController {
protected botLootCacheService: BotLootCacheService; protected botLootCacheService: BotLootCacheService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected profileSnapshotService: ProfileSnapshotService; protected profileSnapshotService: ProfileSnapshotService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected botGenerationCacheService: BotGenerationCacheService; protected botGenerationCacheService: BotGenerationCacheService;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected matchConfig: IMatchConfig; protected matchConfig: IMatchConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
getEnabled(): boolean; getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[]; getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any; createGroup(sessionID: string, info: ICreateGroupRequestData): any;
@ -46,12 +41,17 @@ export declare class MatchController {
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[]; joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
protected getMatch(location: string): any; protected getMatch(location: string): any;
getGroupStatus(info: IGetGroupStatusRequestData): any; getGroupStatus(info: IGetGroupStatusRequestData): any;
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void; /**
* Handle /client/raid/configuration
* @param request
* @param sessionID
*/
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
/** /**
* Convert a difficulty value from pre-raid screen to a bot difficulty * Convert a difficulty value from pre-raid screen to a bot difficulty
* @param botDifficulty dropdown difficulty * @param botDifficulty dropdown difficulty value
* @returns bot difficulty * @returns bot difficulty
*/ */
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: BotDifficulty): string; protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void; endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
} }

View File

@ -1,6 +1,7 @@
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator"; import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile"; import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
@ -24,8 +25,9 @@ export declare class ProfileController {
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected questHelper: QuestHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper); constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
getMiniProfiles(): IMiniProfile[]; getMiniProfiles(): IMiniProfile[];
getMiniProfile(sessionID: string): any; getMiniProfile(sessionID: string): any;
getCompleteProfile(sessionID: string): IPmcData[]; getCompleteProfile(sessionID: string): IPmcData[];

View File

@ -103,6 +103,11 @@ export declare class RagfairController {
* @param profile full profile of player * @param profile full profile of player
*/ */
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void; protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
/**
* Adjust ragfair offer stack count to match same value as traders assort stack count
* @param offer Flea offer to adjust
*/
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
protected isLinkedSearch(info: ISearchRequestData): boolean; protected isLinkedSearch(info: ISearchRequestData): boolean;
protected isRequiredSearch(info: ISearchRequestData): boolean; protected isRequiredSearch(info: ISearchRequestData): boolean;
update(): void; update(): void;
@ -115,6 +120,7 @@ export declare class RagfairController {
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer; createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;
getStaticPrices(): Record<string, number>;
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse; removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
} }

View File

@ -236,16 +236,17 @@ export declare class RepeatableQuestController {
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward; generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
debugLogRepeatableQuestIds(pmcData: IPmcData): void; debugLogRepeatableQuestIds(pmcData: IPmcData): void;
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>; probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
/** /**
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable) * Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
* @param repeatableQuestConfig config file
* @returns a list of rewardable items [[_tpl, itemTemplate],...] * @returns a list of rewardable items [[_tpl, itemTemplate],...]
*/ */
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][]; protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
/** /**
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward * Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash. * or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
* @param {*} tpl template id of item to check * @param {string} tpl template id of item to check
* @returns boolean: true if item is valid reward * @returns boolean: true if item is valid reward
*/ */
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean; isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;

View File

@ -145,7 +145,7 @@ export declare class BotEquipmentModGenerator {
* @param modToAdd template of mod to check * @param modToAdd template of mod to check
* @param itemSlot slot the item will be placed in * @param itemSlot slot the item will be placed in
* @param modSlot slot the mod will fill * @param modSlot slot the mod will fill
* @param parentTemplate tempalte of the mods parent item * @param parentTemplate template of the mods parent item
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;

View File

@ -89,9 +89,10 @@ export declare class BotWeaponGenerator {
/** /**
* Checks if all required slots are occupied on a weapon and all it's mods * Checks if all required slots are occupied on a weapon and all it's mods
* @param weaponItemArray Weapon + mods * @param weaponItemArray Weapon + mods
* @param botRole role of bot weapon is for
* @returns true if valid * @returns true if valid
*/ */
protected isWeaponValid(weaponItemArray: Item[]): boolean; protected isWeaponValid(weaponItemArray: Item[], botRole: string): boolean;
/** /**
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets. * Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
* Additionally, adds extra bullets to SecuredContainer * Additionally, adds extra bullets to SecuredContainer
@ -101,6 +102,13 @@ export declare class BotWeaponGenerator {
* @param botRole The bot type we're getting generating extra mags for * @param botRole The bot type we're getting generating extra mags for
*/ */
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void; addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
/**
* Add Grendaes for UBGL to bots vest and secure container
* @param weaponMods Weapon array with mods
* @param generatedWeaponResult result of weapon generation
* @param inventory bot inventory to add grenades to
*/
protected addUbglGrenadesToBotInventory(weaponMods: Item[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void;
/** /**
* Add ammo to the secure container * Add ammo to the secure container
* @param stackCount How many stacks of ammo to add * @param stackCount How many stacks of ammo to add
@ -137,6 +145,13 @@ export declare class BotWeaponGenerator {
* @param ammoTpl * @param ammoTpl
*/ */
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
/**
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
* @param weaponMods
* @param ubglMod
* @param ubglAmmoTpl
*/
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
/** /**
* Add cartridge item to weapon Item array, if it already exists, update * Add cartridge item to weapon Item array, if it already exists, update
* @param weaponMods Weapon items array to amend * @param weaponMods Weapon items array to amend

View File

@ -49,7 +49,8 @@ export declare class LocationGenerator {
* Add forced spawn point loot into loot parameter array * Add forced spawn point loot into loot parameter array
* @param loot array to add forced loot to * @param loot array to add forced loot to
* @param forcedSpawnPoints forced loot to add * @param forcedSpawnPoints forced loot to add
* @param name of map currently generating forced loot for
*/ */
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[]): void; protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void;
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem; protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
} }

View File

@ -103,7 +103,34 @@ export declare class RagfairOfferGenerator {
* @param traderID Trader to generate offers for * @param traderID Trader to generate offers for
*/ */
generateFleaOffersForTrader(traderID: string): void; generateFleaOffersForTrader(traderID: string): void;
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[]; /**
* Get array of an item with its mods + condition properties (e.g durability)
* Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
* @param userID id of owner of item
* @param itemWithMods Item and mods, get condition of first item (only first array item is used)
* @param itemDetails db details of first item
* @returns
*/
protected getItemCondition(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
/**
* Get the relevant condition id if item tpl matches in ragfair.json/condition
* @param tpl Item to look for matching condition object
* @returns condition id
*/
protected getDynamicConditionIdForTpl(tpl: string): string;
/**
* Alter an items condition based on its item base type
* @param conditionSettingsId also the parentId of item being altered
* @param item Item to adjust condition details of
* @param itemDetails db item details of first item in array
*/
protected randomiseItemCondition(conditionSettingsId: string, item: Item, itemDetails: ITemplateItem): void;
/**
* Adjust an items durability/maxDurability value
* @param item item (weapon/armor) to adjust
* @param multiplier Value to multiple durability by
*/
protected randomiseDurabilityValues(item: Item, multiplier: number): void;
/** /**
* Add missing conditions to an item if needed * Add missing conditions to an item if needed
* Durabiltiy for repairable items * Durabiltiy for repairable items
@ -111,7 +138,7 @@ export declare class RagfairOfferGenerator {
* @param item item to add conditions to * @param item item to add conditions to
* @returns Item with conditions added * @returns Item with conditions added
*/ */
protected addMissingCondition(item: Item): Item; protected addMissingConditions(item: Item): Item;
/** /**
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
* @param offerItems Items for sale in offer * @param offerItems Items for sale in offer

View File

@ -0,0 +1,10 @@
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
import { IInventoryMagGen } from "../IInventoryMagGen";
import { InventoryMagGen } from "../InventoryMagGen";
export declare class UbglExternalMagGen implements IInventoryMagGen {
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
getPriority(): number;
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
process(inventoryMagGen: InventoryMagGen): void;
}

View File

@ -2,6 +2,7 @@ import { MinMax } from "../models/common/MinMax";
import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Inventory } from "../models/eft/common/tables/IBotBase";
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { LocalisationService } from "../services/LocalisationService"; import { LocalisationService } from "../services/LocalisationService";
@ -48,12 +49,13 @@ export declare class BotWeaponGeneratorHelper {
*/ */
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[]; createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
/** /**
* Add a specific number of cartrdiges to a bots inventory (vest/pocket) * Add a specific number of cartrdiges to a bots inventory (defaults to vest and pockets)
* @param ammoTpl Ammo tpl to add to vest/pockets * @param ammoTpl Ammo tpl to add to vest/pockets
* @param cartridgeCount number of cartridges to add to vest/pockets * @param cartridgeCount number of cartridges to add to vest/pockets
* @param inventory bot inventory to add cartridges to * @param inventory bot inventory to add cartridges to
* @param equipmentSlotsToAddTo what equpiment slots should bullets be added into
*/ */
addBulletsToVestAndPockets(ammoTpl: string, cartridgeCount: number, inventory: Inventory): void; addAmmoIntoEquipmentSlots(ammoTpl: string, cartridgeCount: number, inventory: Inventory, equipmentSlotsToAddTo?: EquipmentSlots[]): void;
/** /**
* Get a weapons default magazine template id * Get a weapons default magazine template id
* @param weaponTemplate weapon to get default magazine for * @param weaponTemplate weapon to get default magazine for

View File

@ -23,4 +23,6 @@ export declare class DurabilityLimitsHelper {
protected getMaxWeaponDeltaFromConfig(botRole: string): number; protected getMaxWeaponDeltaFromConfig(botRole: string): number;
protected getMinArmorDeltaFromConfig(botRole: string): number; protected getMinArmorDeltaFromConfig(botRole: string): number;
protected getMaxArmorDeltaFromConfig(botRole: string): number; protected getMaxArmorDeltaFromConfig(botRole: string): number;
protected getMinArmorLimitPercentFromConfig(botRole: string): number;
protected getMinWeaponLimitPercentFromConfig(botRole: string): number;
} }

View File

@ -1,7 +1,6 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Effect } from "../models/eft/health/Effect";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { Effects, IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IHealthConfig } from "../models/spt/config/IHealthConfig"; import { IHealthConfig } from "../models/spt/config/IHealthConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
@ -30,23 +29,29 @@ export declare class HealthHelper {
* @param addEffects Should effects be added or removed (default - add) * @param addEffects Should effects be added or removed (default - add)
*/ */
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
/**
* Adjust hydration/energy/temprate and body part hp values in player profile
* @param pmcData Profile to update
* @param sessionId Session id
*/
protected saveHealth(pmcData: IPmcData, sessionID: string): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
* Works by removing all effects and adding them back from profile * Works by removing all effects and adding them back from profile
* Remoces empty 'Effects' objects if found * Removes empty 'Effects' objects if found
* @param pmcData Player profile * @param pmcData Player profile
* @param sessionID Session id * @param sessionId Session id
* @param bodyPartsWithEffects dict of body parts with effects that should be added to profile
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns
*/ */
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void;
/** /**
* Add effect to body part in profile * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile
* @param effectBodyPart body part to edit * @param effectBodyPart body part to edit
* @param effectType Effect to add to body part * @param effectType Effect to add to body part
* @param duration How long the effect has left in seconds (-1 by default, no duration).
*/ */
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: Effect): void; protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
protected isEmpty(map: any): boolean; protected isEmpty(map: any): boolean;
} }

View File

@ -1,5 +1,5 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Common, HideoutArea, Production, Productive } from "../models/eft/common/tables/IBotBase"; import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "../models/eft/common/tables/IBotBase";
import { Upd } from "../models/eft/common/tables/IItem"; import { Upd } from "../models/eft/common/tables/IItem";
import { StageBonus } from "../models/eft/hideout/IHideoutArea"; import { StageBonus } from "../models/eft/hideout/IHideoutArea";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData"; import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
@ -36,6 +36,7 @@ export declare class HideoutHelper {
static waterCollector: string; static waterCollector: string;
static bitcoin: string; static bitcoin: string;
static expeditionaryFuelTank: string; static expeditionaryFuelTank: string;
static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
@ -118,6 +119,35 @@ export declare class HideoutHelper {
protected hasManagementSkillSlots(pmcData: IPmcData): boolean; protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementSkill(pmcData: IPmcData): Common;
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
/**
* Get the crafting skill details from player profile
* @param pmcData Player profile
* @returns crafting skill, null if not found
*/
protected getCraftingSkill(pmcData: IPmcData): Common;
/**
* Adjust craft time based on crafting skill level found in player profile
* @param pmcData Player profile
* @param productionTime Time to complete hideout craft in seconds
* @returns Adjusted craft time in seconds
*/
protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number;
isProduction(productive: Productive): productive is Production; isProduction(productive: Productive): productive is Production;
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse; getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Upgrade hideout wall from starting level to interactable level if enough time has passed
* @param pmcProfile Profile to upgrade wall in
*/
unlockHideoutWallInProfile(pmcProfile: IPmcData): void;
/**
* Hideout improvement is flagged as complete
* @param improvement hideout improvement object
* @returns true if complete
*/
protected hideoutImprovementIsComplete(improvement: IHideoutImprovement): boolean;
/**
* Iterate over hideout improvements not completed and check if they need to be adjusted
* @param pmcProfile Profile to adjust
*/
setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void;
} }

View File

@ -44,6 +44,11 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
/**
* Take body part effects from client profile and apply to server profile
* @param saveProgressRequest post-raid request
* @param profileData player profile on server
*/
protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
/** /**
* Some maps have one-time-use keys (e.g. Labs * Some maps have one-time-use keys (e.g. Labs

View File

@ -1,6 +1,7 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData"; import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
@ -46,15 +47,41 @@ export declare class InventoryHelper {
/** /**
* BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory)
* @param pmcData Profile to add items to * @param pmcData Profile to add items to
* @param body request data to add items * @param request request data to add items
* @param output response to send back to client * @param output response to send back to client
* @param sessionID Session id * @param sessionID Session id
* @param callback * @param callback Code to execute later (function)
* @param foundInRaid Will results added to inventory be set as found in raid * @param foundInRaid Will results added to inventory be set as found in raid
* @param addUpd Additional upd propertys for items being added to inventory * @param addUpd Additional upd propertys for items being added to inventory
* @returns IItemEventRouterResponse * @returns IItemEventRouterResponse
*/ */
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
(): void;
}, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
/**
* Add ammo to ammo boxes
* @param itemToAdd Item to check is ammo box
* @param toDo
* @param output IItemEventRouterResponse object
* @param sessionID Session id
* @param pmcData Profile to add ammobox to
*/
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void;
/**
*
* @param assortItems Items to add to inventory
* @param requestItem Details of purchased item to add to inventory
* @param result Array split stacks are added to
*/
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
/**
* Remove item from player inventory
* @param pmcData Profile to remove item from
* @param itemId Items id to remove
* @param sessionID Session id
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
* @returns IItemEventRouterResponse
*/
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>; getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;

View File

@ -1,8 +1,9 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Quest } from "../models/eft/common/tables/IBotBase";
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest"; import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData"; import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData"; import { IFailQuestRequestData } from "../models/eft/quests/IFailQuestRequestData";
import { QuestStatus } from "../models/enums/QuestStatus"; import { QuestStatus } from "../models/enums/QuestStatus";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -54,7 +55,7 @@ export declare class QuestHelper {
doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean; doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean;
/** /**
* Get the quests found in both arrays (inner join) * Get the quests found in both arrays (inner join)
* @param before Array of qeusts #1 * @param before Array of quests #1
* @param after Array of quests #2 * @param after Array of quests #2
* @returns Reduction of cartesian product between two quest arrays * @returns Reduction of cartesian product between two quest arrays
*/ */
@ -90,12 +91,12 @@ export declare class QuestHelper {
*/ */
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[]; getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
/** /**
* Update player profile with quest status (e.g. Fail/Success) * Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile
* @param pmcData profile to add quest to * @param pmcData Player profile
* @param newState state the new quest should be in when added * @param newState State the new quest should be in when returned
* @param acceptedQuest Details of quest being added * @param acceptedQuest Details of accepted quest from client
*/ */
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void; getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): Quest;
/** /**
* TODO: what is going on here * TODO: what is going on here
* @param acceptedQuestId Quest to add to profile * @param acceptedQuestId Quest to add to profile
@ -147,16 +148,16 @@ export declare class QuestHelper {
getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest; getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest;
/** /**
* Fail a quest in a player profile * Fail a quest in a player profile
* @param pmcData Profile * @param pmcData Player profile
* @param failRequest fail quest request data * @param failRequest Fail quest request data
* @param sessionID Session id * @param sessionID Session id
* @returns Item event router response * @returns Item event router response
*/ */
failQuest(pmcData: IPmcData, failRequest: any, sessionID: string): IItemEventRouterResponse; failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Get quest by id from database * Get quest by id from database (repeatables are stored in profile, check there if questId not found)
* @param questId questid to look for * @param questId Id of quest to find
* @param pmcData player profile * @param pmcData Player profile
* @returns IQuest object * @returns IQuest object
*/ */
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest; getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
@ -167,25 +168,36 @@ export declare class QuestHelper {
*/ */
getQuestLocaleIdFromDb(questMessageId: string): string; getQuestLocaleIdFromDb(questMessageId: string): string;
/** /**
* Alter a quests state + Add a record to tis status timers object * Alter a quests state + Add a record to its status timers object
* @param pmcData Profile to update * @param pmcData Profile to update
* @param newQuestState new state the qeust should be in * @param newQuestState New state the qeust should be in
* @param questId id of the quest to alter the status of * @param questId Id of the quest to alter the status of
*/ */
updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void; updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void;
/** /**
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks * Give player quest rewards - Skills/exp/trader standing/items/assort unlocks - Returns reward items player earned
* @param pmcData Player profile * @param pmcData Player profile
* @param body complete quest request * @param questId questId of quest to get rewards for
* @param state State of the quest now its complete * @param state State of the quest to get rewards for
* @param sessionID Seession id * @param sessionId Session id
* @returns array of reward objects * @param questResponse Response to send back to client
* @returns Array of reward objects
*/ */
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: QuestStatus, sessionID: string): Reward[]; applyQuestReward(pmcData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Reward[];
/** /**
* Get the intel center bonus a player has * WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
* also update client response recipeUnlocked array with craft id
* @param pmcData Player profile
* @param craftUnlockReward Reward item from quest with craft unlock details
* @param questDetails Quest with craft unlock reward
* @param sessionID Session id
* @param response Response to send back to client
*/
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
/**
* Get players intel center bonus from profile
* @param pmcData player profile * @param pmcData player profile
* @returns bonus in percent * @returns bonus as a percent
*/ */
protected getIntelCenterRewardBonus(pmcData: IPmcData): number; protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
/** /**
@ -194,4 +206,10 @@ export declare class QuestHelper {
* @returns 'FindItem' condition id * @returns 'FindItem' condition id
*/ */
getFindItemIdForQuestHandIn(itemTpl: string): string; getFindItemIdForQuestHandIn(itemTpl: string): string;
/**
* Add all quests to a profile with the provided statuses
* @param pmcProfile profile to update
* @param statuses statuses quests should have
*/
addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void;
} }

View File

@ -27,10 +27,10 @@ export declare class TradeHelper {
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/** /**
* Buy item from flea or trader * Buy item from flea or trader
* @param pmcData * @param pmcData Player profile
* @param buyRequestData data from client * @param buyRequestData data from client
* @param sessionID * @param sessionID Session id
* @param foundInRaid * @param foundInRaid Should item be found in raid
* @param upd optional item details used when buying from flea * @param upd optional item details used when buying from flea
* @returns * @returns
*/ */
@ -38,11 +38,11 @@ export declare class TradeHelper {
/** /**
* Sell item to trader * Sell item to trader
* @param pmcData Profile to update * @param pmcData Profile to update
* @param body * @param sellRequest request data
* @param sessionID * @param sessionID Session id
* @returns * @returns IItemEventRouterResponse
*/ */
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse; sellItem(pmcData: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Increment the assorts buy count by number of items purchased * Increment the assorts buy count by number of items purchased
* Show error on screen if player attepts to buy more than what the buy max allows * Show error on screen if player attepts to buy more than what the buy max allows

View File

@ -76,7 +76,7 @@ export declare class TraderHelper {
*/ */
protected getTraderDurabiltyPurchaseThreshold(traderId: string): number; protected getTraderDurabiltyPurchaseThreshold(traderId: string): number;
/** /**
* Get the price of an item and all of its attached children * Get the price of passed in item and all of its attached children (mods)
* Take into account bonuses/adjsutments e.g. discounts * Take into account bonuses/adjsutments e.g. discounts
* @param pmcData profile data * @param pmcData profile data
* @param item item to calculate price of * @param item item to calculate price of
@ -94,7 +94,14 @@ export declare class TraderHelper {
* @returns price as number * @returns price as number
*/ */
protected getRawItemPrice(pmcData: IPmcData, item: Item): number; protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number; /**
* Get discount modifier for desired trader
* @param trader Trader to get discount for
* @param buyPriceCoefficient
* @param fenceInfo fence info, needed if getting fence modifier value
* @returns discount modifier value
*/
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel): number;
/** /**
* Add standing to a trader and level them up if exp goes over level threshold * Add standing to a trader and level them up if exp goes over level threshold
* @param sessionID Session id * @param sessionID Session id

View File

@ -23,6 +23,8 @@ export declare class PreAkiModLoader implements IModLoader {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected static container: DependencyContainer; protected static container: DependencyContainer;
protected readonly basepath = "user/mods/"; protected readonly basepath = "user/mods/";
protected readonly modOrderPath = "user/mods/order.json";
protected order: Record<string, number>;
protected imported: Record<string, ModLoader.IMod>; protected imported: Record<string, ModLoader.IMod>;
protected akiConfig: ICoreConfig; protected akiConfig: ICoreConfig;
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer);

View File

@ -29,6 +29,8 @@ export interface Config {
GlobalLootChanceModifier: number; GlobalLootChanceModifier: number;
TimeBeforeDeploy: number; TimeBeforeDeploy: number;
TimeBeforeDeployLocal: number; TimeBeforeDeployLocal: number;
TradingSetting: number;
TradingSettings: ITradingSettings;
LoadTimeSpeedProgress: number; LoadTimeSpeedProgress: number;
BaseLoadTime: number; BaseLoadTime: number;
BaseUnloadTime: number; BaseUnloadTime: number;
@ -36,6 +38,7 @@ export interface Config {
Customization: Customization; Customization: Customization;
UncheckOnShot: boolean; UncheckOnShot: boolean;
BotsEnabled: boolean; BotsEnabled: boolean;
BufferZone: IBufferZone;
ArmorMaterials: ArmorMaterials; ArmorMaterials: ArmorMaterials;
LegsOverdamage: number; LegsOverdamage: number;
HandsOverdamage: number; HandsOverdamage: number;
@ -55,7 +58,6 @@ export interface Config {
StaminaRestoration: StaminaRestoration; StaminaRestoration: StaminaRestoration;
StaminaDrain: StaminaDrain; StaminaDrain: StaminaDrain;
RequirementReferences: RequirementReferences; RequirementReferences: RequirementReferences;
RepairKitSettings: RepairKitSettings;
RestrictionsInRaid: RestrictionsInRaid[]; RestrictionsInRaid: RestrictionsInRaid[];
SkillMinEffectiveness: number; SkillMinEffectiveness: number;
SkillFatiguePerPoint: number; SkillFatiguePerPoint: number;
@ -83,6 +85,19 @@ export interface Config {
Inertia: Inertia; Inertia: Inertia;
Ballistic: Ballistic; Ballistic: Ballistic;
} }
export interface IBufferZone {
CustomerAccessTime: number;
CustomerCriticalTimeStart: number;
CustomerKickNotifTime: number;
}
export interface ITradingSettings {
BuyoutRestrictions: IBuyoutRestrictions;
}
export interface IBuyoutRestrictions {
MinDurability: number;
MinFoodDrinkResource: number;
MinMedsResource: number;
}
export interface Content { export interface Content {
ip: string; ip: string;
port: number; port: number;
@ -321,6 +336,8 @@ export interface Effects {
Pain: Pain; Pain: Pain;
PainKiller: PainKiller; PainKiller: PainKiller;
SandingScreen: SandingScreen; SandingScreen: SandingScreen;
MildMusclePain: IMusclePainEffect;
SevereMusclePain: IMusclePainEffect;
Stimulator: Stimulator; Stimulator: Stimulator;
Tremor: Tremor; Tremor: Tremor;
ChronicStaminaFatigue: ChronicStaminaFatigue; ChronicStaminaFatigue: ChronicStaminaFatigue;
@ -457,6 +474,12 @@ export interface PainKiller {
export interface SandingScreen { export interface SandingScreen {
Dummy: number; Dummy: number;
} }
export interface IMusclePainEffect {
GymEffectivity: number;
OfflineDurationMax: number;
OfflineDurationMin: number;
TraumaChance: number;
}
export interface Stimulator { export interface Stimulator {
BuffLoopTime: number; BuffLoopTime: number;
Buffs: Buffs; Buffs: Buffs;
@ -803,7 +826,7 @@ export interface SkillsSettings {
HMG: any[]; HMG: any[];
Launcher: any[]; Launcher: any[];
AttachedLauncher: any[]; AttachedLauncher: any[];
Melee: any[]; Melee: IMeleeSkill;
DMR: WeaponSkills; DMR: WeaponSkills;
BearAssaultoperations: any[]; BearAssaultoperations: any[];
BearAuthority: any[]; BearAuthority: any[];
@ -847,10 +870,25 @@ export interface SkillsSettings {
BotSound: any[]; BotSound: any[];
TroubleShooting: TroubleShooting; TroubleShooting: TroubleShooting;
} }
export interface IMeleeSkill {
BuffSettings: IBuffSettings;
}
export interface ArmorSkills { export interface ArmorSkills {
BuffMaxCount: number;
BuffSettings: IBuffSettings;
Counters: IArmorCounters;
MoveSpeedPenaltyReductionHVestsReducePerLevel: number;
RicochetChanceHVestsCurrentDurabilityThreshold: number;
RicochetChanceHVestsEliteLevel: number;
RicochetChanceHVestsMaxDurabilityThreshold: number;
MeleeDamageLVestsReducePerLevel: number;
MoveSpeedPenaltyReductionLVestsReducePerLevel: number;
WearAmountRepairLVestsReducePerLevel: number; WearAmountRepairLVestsReducePerLevel: number;
WearChanceRepairLVestsReduceEliteLevel: number; WearChanceRepairLVestsReduceEliteLevel: number;
} }
export interface IArmorCounters {
armorDurability: ISkillCounter;
}
export interface HideoutManagement { export interface HideoutManagement {
SkillPointsPerAreaUpgrade: number; SkillPointsPerAreaUpgrade: number;
SkillPointsPerCraft: number; SkillPointsPerCraft: number;
@ -907,6 +945,7 @@ export interface Endurance {
MovementAction: number; MovementAction: number;
SprintAction: number; SprintAction: number;
GainPerFatigueStack: number; GainPerFatigueStack: number;
QTELevelMultipliers: Record<string, Record<string, number>>;
} }
export interface Strength { export interface Strength {
SprintActionMin: number; SprintActionMin: number;
@ -915,9 +954,14 @@ export interface Strength {
MovementActionMax: number; MovementActionMax: number;
PushUpMin: number; PushUpMin: number;
PushUpMax: number; PushUpMax: number;
QTELevelMultipliers: IQTELevelMultiplier[];
FistfightAction: number; FistfightAction: number;
ThrowAction: number; ThrowAction: number;
} }
export interface IQTELevelMultiplier {
Level: number;
Multiplier: number;
}
export interface Vitality { export interface Vitality {
DamageTakenAction: number; DamageTakenAction: number;
HealthNegativeEffect: number; HealthNegativeEffect: number;
@ -950,22 +994,42 @@ export interface Search {
FindAction: number; FindAction: number;
} }
export interface WeaponTreatment { export interface WeaponTreatment {
BuffMaxCount: number;
BuffSettings: IBuffSettings;
Counters: IWeaponTreatmentCounters;
DurLossReducePerLevel: number; DurLossReducePerLevel: number;
SkillPointsPerRepair: number; SkillPointsPerRepair: number;
Filter: any[]; Filter: any[];
WearAmountRepairGunsReducePerLevel: number; WearAmountRepairGunsReducePerLevel: number;
WearChanceRepairGunsReduceEliteLevel: number; WearChanceRepairGunsReduceEliteLevel: number;
} }
export interface IWeaponTreatmentCounters {
firearmsDurability: ISkillCounter;
}
export interface IBuffSettings {
CommonBuffChanceLevelBonus: number;
CommonBuffMinChanceValue: number;
CurrentDurabilityLossToRemoveBuff?: number;
MaxDurabilityLossToRemoveBuff?: number;
RareBuffChanceCoff: number;
ReceivedDurabilityMaxPercent: number;
}
export interface MagDrills { export interface MagDrills {
RaidLoadedAmmoAction: number; RaidLoadedAmmoAction: number;
RaidUnloadedAmmoAction: number; RaidUnloadedAmmoAction: number;
MagazineCheckAction: number; MagazineCheckAction: number;
} }
export interface Perception { export interface Perception {
DependentSkillRatios: ISkillRatio[];
OnlineAction: number; OnlineAction: number;
UniqueLoot: number; UniqueLoot: number;
} }
export interface ISkillRatio {
Ratio: number;
SkillId: string;
}
export interface Intellect { export interface Intellect {
Counters: IIntellectCounters;
ExamineAction: number; ExamineAction: number;
SkillProgress: number; SkillProgress: number;
RepairAction: number; RepairAction: number;
@ -973,16 +1037,52 @@ export interface Intellect {
WearChanceReduceEliteLevel: number; WearChanceReduceEliteLevel: number;
RepairPointsCostReduction: number; RepairPointsCostReduction: number;
} }
export interface IIntellectCounters {
armorDurability: ISkillCounter;
firearmsDurability: ISkillCounter;
meleeWeaponDurability: ISkillCounter;
}
export interface ISkillCounter {
divisor: number;
points: number;
}
export interface Attention { export interface Attention {
DependentSkillRatios: ISkillRatio[];
ExamineWithInstruction: number; ExamineWithInstruction: number;
FindActionFalse: number; FindActionFalse: number;
FindActionTrue: number; FindActionTrue: number;
} }
export interface Charisma { export interface Charisma {
BonusSettings: IBonusSettings;
Counters: ICharismaSkillCounters;
SkillProgressInt: number; SkillProgressInt: number;
SkillProgressAtn: number; SkillProgressAtn: number;
SkillProgressPer: number; SkillProgressPer: number;
} }
export interface ICharismaSkillCounters {
insuranceCost: ISkillCounter;
repairCost: ISkillCounter;
repeatableQuestCompleteCount: ISkillCounter;
restoredHealthCost: ISkillCounter;
scavCaseCost: ISkillCounter;
}
export interface IBonusSettings {
EliteBonusSettings: IEliteBonusSettings;
LevelBonusSettings: ILevelBonusSettings;
}
export interface IEliteBonusSettings {
FenceStandingLossDiscount: number;
RepeatableQuestExtraCount: number;
ScavCaseDiscount: number;
}
export interface ILevelBonusSettings {
HealthRestoreDiscount: number;
HealthRestoreTraderDiscount: number;
InsuranceDiscount: number;
InsuranceTraderDiscount: number;
PaidExitDiscount: number;
RepeatableQuestChangeDiscount: number;
}
export interface Memory { export interface Memory {
AnySkillUp: number; AnySkillUp: number;
SkillProgress: number; SkillProgress: number;
@ -1145,11 +1245,30 @@ export interface xyz {
export interface Ballistic { export interface Ballistic {
GlobalDamageDegradationCoefficient: number; GlobalDamageDegradationCoefficient: number;
} }
export interface RepairKitSettings { export interface RepairSettings {
ItemEnhancementSettings: IItemEnhancementSettings;
MinimumLevelToApplyBuff: number;
RepairStrategies: IRepairStrategies;
armorClassDivisor: number; armorClassDivisor: number;
durabilityPointCostArmor: number; durabilityPointCostArmor: number;
durabilityPointCostGuns: number; durabilityPointCostGuns: number;
} }
export interface IItemEnhancementSettings {
DamageReduction: IPriceModifier;
MalfunctionProtections: IPriceModifier;
WeaponSpread: IPriceModifier;
}
export interface IPriceModifier {
PriceModifier: number;
}
export interface IRepairStrategies {
Armor: IRepairStrategy;
Firearms: IRepairStrategy;
}
export interface IRepairStrategy {
BuffTypes: string[];
Filter: string[];
}
export interface BotPreset { export interface BotPreset {
UseThis: boolean; UseThis: boolean;
Role: string; Role: string;

View File

@ -118,6 +118,7 @@ export interface BossLocationSpawn {
TriggerName: string; TriggerName: string;
Delay?: number; Delay?: number;
Supports?: BossSupport[]; Supports?: BossSupport[];
sptId?: string;
} }
export interface BossSupport { export interface BossSupport {
BossEscortAmount: string; BossEscortAmount: string;
@ -202,6 +203,7 @@ export interface Wave {
slots_min: number; slots_min: number;
time_max: number; time_max: number;
time_min: number; time_min: number;
sptId?: string;
} }
export declare enum WildSpawnType { export declare enum WildSpawnType {
ASSAULT = "assault", ASSAULT = "assault",

View File

@ -21,6 +21,7 @@ export interface IBotBase {
Hideout: Hideout; Hideout: Hideout;
Quests: Quest[]; Quests: Quest[];
TradersInfo: Record<string, TraderInfo>; TradersInfo: Record<string, TraderInfo>;
UnlockedInfo: IUnlockedInfo;
RagfairInfo: RagfairInfo; RagfairInfo: RagfairInfo;
RepeatableQuests: IPmcDataRepeatableQuest[]; RepeatableQuests: IPmcDataRepeatableQuest[];
Bonuses: Bonus[]; Bonuses: Bonus[];
@ -31,6 +32,9 @@ export interface IBotBase {
/** SPT specific property used during bot generation in raid */ /** SPT specific property used during bot generation in raid */
sptIsPmc?: boolean; sptIsPmc?: boolean;
} }
export interface IUnlockedInfo {
unlockedProductionRecipe: string[];
}
export interface Info { export interface Info {
EntryPoint: string; EntryPoint: string;
Nickname: string; Nickname: string;
@ -265,12 +269,19 @@ export interface InsuredItem {
export interface Hideout { export interface Hideout {
Production: Record<string, Productive>; Production: Record<string, Productive>;
Areas: HideoutArea[]; Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
}
export interface IHideoutImprovement {
completed: boolean;
improveCompleteTimestamp: number;
} }
export interface Productive { export interface Productive {
Products: Product[]; Products: Product[];
Progress?: number; Progress?: number;
inProgress?: boolean; inProgress?: boolean;
StartTimestamp?: number; StartTimestamp?: number;
SkipTime?: number;
ProductionTime?: number;
} }
export interface Production extends Productive { export interface Production extends Productive {
RecipeId: string; RecipeId: string;
@ -327,10 +338,12 @@ export interface Quest {
statusTimers?: Record<string, number>; statusTimers?: Record<string, number>;
/** SPT specific property */ /** SPT specific property */
completedConditions?: string[]; completedConditions?: string[];
availableAfter?: number;
} }
export interface TraderInfo { export interface TraderInfo {
loyaltyLevel: number; loyaltyLevel: number;
salesSum: number; salesSum: number;
disabled: boolean;
standing: number; standing: number;
nextResupply: number; nextResupply: number;
unlocked: boolean; unlocked: boolean;

View File

@ -7,6 +7,7 @@ export interface Item {
upd?: Upd; upd?: Upd;
} }
export interface Upd { export interface Upd {
Buff?: Buff;
OriginalStackObjectsCount?: number; OriginalStackObjectsCount?: number;
Togglable?: Togglable; Togglable?: Togglable;
Map?: Map; Map?: Map;
@ -31,6 +32,12 @@ export interface Upd {
SideEffect?: SideEffect; SideEffect?: SideEffect;
RepairKit?: RepairKit; RepairKit?: RepairKit;
} }
export interface Buff {
rarity: string;
buffType: string;
value: number;
thresholdDurability?: number;
}
export interface Togglable { export interface Togglable {
On: boolean; On: boolean;
} }
@ -98,7 +105,8 @@ export interface Location {
y: number; y: number;
r: string | number; r: string | number;
isSearched?: boolean; isSearched?: boolean;
rotation?: string; /** SPT property? */
rotation?: string | boolean;
} }
export interface SideEffect { export interface SideEffect {
Value: number; Value: number;

View File

@ -19,6 +19,8 @@ export interface TemplateSide {
} }
export interface ProfileTraderTemplate { export interface ProfileTraderTemplate {
initialLoyaltyLevel: number; initialLoyaltyLevel: number;
setQuestsAvailableForStart?: boolean;
setQuestsAvailableForFinish?: boolean;
initialStanding: number; initialStanding: number;
initialSalesSum: number; initialSalesSum: number;
jaegerUnlocked: boolean; jaegerUnlocked: boolean;

View File

@ -2,7 +2,7 @@ import { QuestRewardType } from "../../../enums/QuestRewardType";
import { QuestStatus } from "../../../enums/QuestStatus"; import { QuestStatus } from "../../../enums/QuestStatus";
import { Item } from "./IItem"; import { Item } from "./IItem";
export interface IQuest { export interface IQuest {
QuestName: string; QuestName?: string;
_id: string; _id: string;
canShowNotificationsInGame: boolean; canShowNotificationsInGame: boolean;
conditions: Conditions; conditions: Conditions;
@ -15,6 +15,7 @@ export interface IQuest {
image: string; image: string;
type: string; type: string;
isKey: boolean; isKey: boolean;
questStatus: any;
restartable: boolean; restartable: boolean;
instantComplete: boolean; instantComplete: boolean;
secretQuest: boolean; secretQuest: boolean;
@ -22,7 +23,7 @@ export interface IQuest {
successMessageText: string; successMessageText: string;
templateId: string; templateId: string;
rewards: Rewards; rewards: Rewards;
status: string; status: string | number;
KeyQuest: boolean; KeyQuest: boolean;
changeQuestMessageText: string; changeQuestMessageText: string;
side: string; side: string;
@ -43,12 +44,15 @@ export interface AvailableForProps {
id: string; id: string;
index: number; index: number;
parentId: string; parentId: string;
isEncoded: boolean;
dynamicLocale: boolean; dynamicLocale: boolean;
value?: number; value?: number;
compareMethod?: string; compareMethod?: string;
visibilityConditions?: VisibilityCondition[]; visibilityConditions?: VisibilityCondition[];
target?: string | string[]; target?: string | string[];
status?: QuestStatus[]; status?: QuestStatus[];
availableAfter?: number;
dispersion?: number;
onlyFoundInRaid?: boolean; onlyFoundInRaid?: boolean;
oneSessionOnly?: boolean; oneSessionOnly?: boolean;
doNotResetIfCounterCompleted?: boolean; doNotResetIfCounterCompleted?: boolean;

View File

@ -29,8 +29,11 @@ export interface Props {
IsUnsaleable?: boolean; IsUnsaleable?: boolean;
IsUnbuyable?: boolean; IsUnbuyable?: boolean;
IsUngivable?: boolean; IsUngivable?: boolean;
IsUnremovable?: boolean;
IsLockedafterEquip?: boolean; IsLockedafterEquip?: boolean;
IsSpecialSlotOnly?: boolean;
QuestItem?: boolean; QuestItem?: boolean;
QuestStashMaxCount?: number;
LootExperience?: number; LootExperience?: number;
ExamineExperience?: number; ExamineExperience?: number;
HideEntrails?: boolean; HideEntrails?: boolean;
@ -161,6 +164,7 @@ export interface Props {
weaponErgonomicPenalty?: number; weaponErgonomicPenalty?: number;
BluntThroughput?: number; BluntThroughput?: number;
ArmorMaterial?: string; ArmorMaterial?: string;
ArmorType?: string;
weapClass?: string; weapClass?: string;
weapUseType?: string; weapUseType?: string;
ammoCaliber?: string; ammoCaliber?: string;
@ -365,6 +369,8 @@ export interface Props {
CanBeHiddenDuringThrow?: boolean; CanBeHiddenDuringThrow?: boolean;
MinTimeToContactExplode?: number; MinTimeToContactExplode?: number;
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -9,6 +9,7 @@ export interface ITrader {
export interface ITraderBase { export interface ITraderBase {
refreshTraderRagfairOffers: boolean; refreshTraderRagfairOffers: boolean;
_id: string; _id: string;
availableInRaid: boolean;
avatar: string; avatar: string;
balance_dol: number; balance_dol: number;
balance_eur: number; balance_eur: number;
@ -20,6 +21,8 @@ export interface ITraderBase {
discount_end: number; discount_end: number;
gridHeight: number; gridHeight: number;
insurance: Insurance; insurance: Insurance;
items_buy: IItemBuyData;
items_buy_prohibited: IItemBuyData;
location: string; location: string;
loyaltyLevels: LoyaltyLevel[]; loyaltyLevels: LoyaltyLevel[];
medic: boolean; medic: boolean;
@ -31,6 +34,10 @@ export interface ITraderBase {
surname: string; surname: string;
unlockedByDefault: boolean; unlockedByDefault: boolean;
} }
export interface IItemBuyData {
category: string[];
id_list: string[];
}
export interface Insurance { export interface Insurance {
availability: boolean; availability: boolean;
excluded_category: string[]; excluded_category: string[];

View File

@ -0,0 +1,5 @@
export interface IGetItemPricesResponse {
supplyNextTime: number;
prices: Record<string, number>;
currencyCourses: Record<string, number>;
}

View File

@ -1,5 +1,7 @@
export declare enum Effect { export declare enum Effect {
FRACTURE = "Fracture", FRACTURE = "Fracture",
LIGHT_BLEEDING = "LightBleeding", LIGHT_BLEEDING = "LightBleeding",
HEAVY_BLEEDING = "HeavyBleeding" HEAVY_BLEEDING = "HeavyBleeding",
MILD_MUSCLE_PAIN = "MildMusclePain",
SEVERE_MUSCLE_PAIN = "SevereMusclePain"
} }

View File

@ -0,0 +1,4 @@
export interface IWorkoutData extends Record<string, any> {
skills: any;
effects: any;
}

View File

@ -0,0 +1,8 @@
export interface IHandleQTEEventRequestData {
Action: string;
/** true if QTE was successful, otherwise false */
results: boolean[];
/** Id of the QTE object used from db/hideout/qte.json */
id: string;
timestamp: number;
}

View File

@ -3,23 +3,55 @@ export interface IHideoutArea {
type: number; type: number;
enabled: boolean; enabled: boolean;
needsFuel: boolean; needsFuel: boolean;
requirements: IAreaRequirement[];
takeFromSlotLocked: boolean; takeFromSlotLocked: boolean;
craftGivesExp: boolean; craftGivesExp: boolean;
displayLevel: boolean;
enableAreaRequirements: boolean;
stages: Record<string, Stage>; stages: Record<string, Stage>;
} }
export interface IAreaRequirement {
areaType: number;
requiredlevel: number;
type: string;
}
export interface Stage { export interface Stage {
requirements: Requirement[]; autoUpgrade: boolean;
bonuses: StageBonus[]; bonuses: StageBonus[];
slots: number;
constructionTime: number; constructionTime: number;
description: string; description: string;
displayInterface: boolean;
improvements: IStageImprovement[];
requirements: IStageRequirement[];
slots: number;
} }
export interface Requirement { export interface IStageImprovement {
id: string;
bonuses: IStageImprovementBonus[];
improvementTime: number;
requirements: IStageImprovementRequirement[];
}
export interface IStageImprovementBonus {
passive: boolean;
production: boolean;
type: string;
value: number;
visible: boolean;
}
export interface IStageImprovementRequirement {
count: number;
isEncoded: boolean;
isFunctional: boolean;
templateId: string;
type: string;
}
export interface IStageRequirement {
areaType?: number; areaType?: number;
requiredLevel?: number; requiredLevel?: number;
type: string; type: string;
templateId?: string; templateId?: string;
count?: number; count?: number;
isEncoded: false;
isFunctional?: boolean; isFunctional?: boolean;
traderId?: string; traderId?: string;
loyaltyLevel?: number; loyaltyLevel?: number;

View File

@ -0,0 +1,13 @@
export interface IHideoutImproveAreaRequestData {
Action: "HideoutImproveArea";
/** Hideout area id from areas.json */
id: string;
areaType: number;
items: HideoutItem[];
timestamp: number;
}
export interface HideoutItem {
/** Hideout inventory id that was used by improvement action */
id: string;
count: number;
}

View File

@ -3,8 +3,10 @@ export interface IHideoutProduction {
areaType: number; areaType: number;
requirements: Requirement[]; requirements: Requirement[];
productionTime: number; productionTime: number;
boosters?: any;
endProduct: string; endProduct: string;
isEncoded: boolean;
locked: boolean;
needFuelForAllProductionTime: boolean;
continuous: boolean; continuous: boolean;
count: number; count: number;
productionLimitCount: number; productionLimitCount: number;
@ -12,6 +14,7 @@ export interface IHideoutProduction {
export interface Requirement { export interface Requirement {
templateId?: string; templateId?: string;
count?: number; count?: number;
isEncoded?: boolean;
isFunctional?: boolean; isFunctional?: boolean;
type: string; type: string;
areaType?: number; areaType?: number;

View File

@ -0,0 +1,38 @@
export interface IQteData {
Id: string;
Type: string;
Area: string;
AreaLevel: number;
QuickTimeEvents: IQuickTimeEvent[];
Requirements: IQteRequirement[];
Results: Record<string, IQteResult>;
}
export interface IQuickTimeEvent {
Type: string;
Position: number;
StartDelay: number;
EndDelay: number;
Speed: number;
SuccessRange: string;
Key: string;
}
export interface IQteRequirement {
type: string;
}
export interface IQteResult {
Energy: number;
Hydration: number;
RewardsRange: IQteEffect[];
}
export interface IQteEffect {
Type: string;
SkillId: string;
levelMultipliers: ISkillLevelMultiplier[];
Time: number;
Weight: number;
Result: string;
}
export interface ISkillLevelMultiplier {
level: number;
multiplier: number;
}

View File

@ -0,0 +1,4 @@
export interface IRecordShootingRangePoints {
Action: "RecordShootingRangePoints";
points: number;
}

View File

@ -0,0 +1,7 @@
import { Item, Location } from "../common/tables/IItem";
export interface IAddItemTempObject {
itemRef: Item;
count: number;
isPreset: boolean;
location?: Location;
}

View File

@ -1,3 +1,4 @@
import { QuestStatus } from "../../../models/enums/QuestStatus";
import { Skills } from "../common/tables/IBotBase"; import { Skills } from "../common/tables/IBotBase";
import { Item, Upd } from "../common/tables/IItem"; import { Item, Upd } from "../common/tables/IItem";
import { IQuest } from "../common/tables/IQuest"; import { IQuest } from "../common/tables/IQuest";
@ -22,9 +23,21 @@ export interface ProfileChange {
builds: BuildChange[]; builds: BuildChange[];
items: ItemChanges; items: ItemChanges;
production: Record<string, Production>; production: Record<string, Production>;
/** Hideout area improvement id */
improvements: Record<string, Improvement>;
skills: Skills; skills: Skills;
traderRelations: Record<string, TraderRelations>; traderRelations: Record<string, TraderRelations>;
repeatableQuests?: IPmcDataRepeatableQuest[]; repeatableQuests?: IPmcDataRepeatableQuest[];
recipeUnlocked: Record<string, boolean>;
questsStatus: QuestStatusChange[];
}
export interface QuestStatusChange {
qid: string;
startTime: number;
status: QuestStatus;
statusTimers: Record<QuestStatus, number>;
completedConditions: string[];
availableAfter: number;
} }
export interface BuildChange { export interface BuildChange {
id: string; id: string;
@ -45,6 +58,10 @@ export interface Production {
RecipeId: string; RecipeId: string;
Products: Product[]; Products: Product[];
} }
export interface Improvement {
completed: boolean;
improveCompleteTimestamp: number;
}
export interface Product { export interface Product {
_id: string; _id: string;
_tpl?: string; _tpl?: string;

View File

@ -0,0 +1,30 @@
export interface IGetRaidConfigurationRequestData {
timeVariant: string;
raidMode: string;
metabolismDisabled: boolean;
playersSpawnPlace: string;
timeAndWeatherSettings: TimeAndWeatherSettings;
botSettings: BotSettings;
wavesSettings: WavesSettings;
location: string;
}
export interface TimeAndWeatherSettings {
isRandomTime: boolean;
isRandomWeather: boolean;
cloudinessType: string;
rainType: string;
windType: string;
fogType: string;
timeFlowType: string;
hourOfDay: number;
}
export interface BotSettings {
isScavWars: boolean;
botAmount: string;
}
export interface WavesSettings {
botAmount: string;
botDifficulty: string;
isBosses: boolean;
isTaggedAndCursed: boolean;
}

View File

@ -1,30 +0,0 @@
import { BotAmount } from "../../enums/BotAmount";
import { BotDifficulty } from "../../enums/BotDifficulty";
export interface IStartOfflineRaidRequestData {
locationName: string;
/** Current time, not in-game time */
startTime: number;
/** CURR = am, past = pm */
dateTime: "CURR" | "PAST";
gameSettings: GameSettings;
}
export interface GameSettings {
timeAndWeatherSettings: TimeAndWeatherSettings;
botsSettings: BotsSettings;
wavesSettings: WavesSettings;
}
export interface TimeAndWeatherSettings {
isRandomTime: boolean;
isRandomWeather: boolean;
}
export interface BotsSettings {
isEnabled: boolean;
isScavWars: boolean;
botAmount: BotAmount;
}
export interface WavesSettings {
botDifficulty: BotDifficulty;
isBosses: boolean;
isTaggedAndCursed: boolean;
wavesBotAmount: BotAmount;
}

View File

@ -0,0 +1,5 @@
export interface IFailQuestRequestData {
Action: "QuestComplete";
qid: string;
removeExcessItems: boolean;
}

View File

@ -3,6 +3,7 @@ export interface IProcessSellTradeRequestData extends IProcessBaseTradeRequestDa
Action: "sell_to_trader"; Action: "sell_to_trader";
type: string; type: string;
tid: string; tid: string;
price: number;
items: Item[]; items: Item[];
} }
export interface Item { export interface Item {

View File

@ -1,11 +1,13 @@
export declare enum BaseClasses { export declare enum BaseClasses {
WEAPON = "5422acb9af1c889c16000029", WEAPON = "5422acb9af1c889c16000029",
UBGL = "55818b014bdc2ddc698b456b",
ARMOR = "5448e54d4bdc2dcc718b4568", ARMOR = "5448e54d4bdc2dcc718b4568",
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b", ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
HEADWEAR = "5a341c4086f77401f2541505", HEADWEAR = "5a341c4086f77401f2541505",
FACECOVER = "5a341c4686f77469e155819e", FACECOVER = "5a341c4686f77469e155819e",
VEST = "5448e5284bdc2dcb718b4567", VEST = "5448e5284bdc2dcb718b4567",
BACKPACK = "5448e53e4bdc2d60728b4567", BACKPACK = "5448e53e4bdc2d60728b4567",
COMPOUND = "566162e44bdc2d3f298b4573",
VISORS = "5448e5724bdc2ddf718b4568", VISORS = "5448e5724bdc2ddf718b4568",
FOOD = "5448e8d04bdc2ddf718b4569", FOOD = "5448e8d04bdc2ddf718b4569",
GAS_BLOCK = "56ea9461d2720b67698b456f", GAS_BLOCK = "56ea9461d2720b67698b456f",
@ -29,6 +31,7 @@ export declare enum BaseClasses {
MUZZLE = "5448fe394bdc2d0d028b456c", MUZZLE = "5448fe394bdc2d0d028b456c",
SIGHTS = "5448fe7a4bdc2d6f028b456b", SIGHTS = "5448fe7a4bdc2d6f028b456b",
MEDS = "543be5664bdc2dd4348b4569", MEDS = "543be5664bdc2dd4348b4569",
MAP = "567849dd4bdc2d150f8b456e",
MONEY = "543be5dd4bdc2deb348b4569", MONEY = "543be5dd4bdc2deb348b4569",
NIGHTVISION = "5a2c3a9486f774688b05e574", NIGHTVISION = "5a2c3a9486f774688b05e574",
KEY = "543be5e94bdc2df1348b4568", KEY = "543be5e94bdc2df1348b4568",

View File

@ -8,5 +8,6 @@ export declare enum ELocationName {
LIGHTHOUSE = "Lighthouse", LIGHTHOUSE = "Lighthouse",
LABORATORY = "laboratory", LABORATORY = "laboratory",
RESERVE = "RezervBase", RESERVE = "RezervBase",
STREETS = "TarkovStreets",
ANY = "any" ANY = "any"
} }

View File

@ -21,5 +21,7 @@ export declare enum HideoutAreas {
SOLAR_POWER = 18, SOLAR_POWER = 18,
BOOZE_GENERATOR = 19, BOOZE_GENERATOR = 19,
BITCOIN_FARM = 20, BITCOIN_FARM = 20,
CHRISTMAS_TREE = 21 CHRISTMAS_TREE = 21,
EMERGENCY_WALL = 22,
GYM = 23
} }

View File

@ -7,5 +7,7 @@ export declare enum HideoutEventActions {
HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart", HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart",
HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart", HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart",
HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart", HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart",
HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction" HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction",
HIDEOUT_RECORD_SHOOTING_RANGE_POINTS = "RecordShootingRangePoints",
HIDEOUT_IMPROVE_AREA = "HideoutImproveArea"
} }

View File

@ -15,5 +15,6 @@ export declare enum ItemEventActions {
CREATE_MAP_MARKER = "CreateMapMarker", CREATE_MAP_MARKER = "CreateMapMarker",
DELETE_MAP_MARKER = "DeleteMapMarker", DELETE_MAP_MARKER = "DeleteMapMarker",
EDIT_MAP_MARKER = "EditMapMarker", EDIT_MAP_MARKER = "EditMapMarker",
OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer" OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer",
HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent"
} }

View File

@ -4,5 +4,6 @@ export declare enum QuestRewardType {
TRADER_STANDING = "TraderStanding", TRADER_STANDING = "TraderStanding",
TRADER_UNLOCK = "TraderUnlock", TRADER_UNLOCK = "TraderUnlock",
ITEM = "Item", ITEM = "Item",
ASSORTMENT_UNLOCK = "AssortmentUnlock" ASSORTMENT_UNLOCK = "AssortmentUnlock",
PRODUCTIONS_SCHEME = "ProductionScheme"
} }

View File

@ -7,5 +7,6 @@ export declare enum QuestStatus {
Fail = 5, Fail = 5,
FailRestartable = 6, FailRestartable = 6,
MarkedAsFailed = 7, MarkedAsFailed = 7,
Expired = 8 Expired = 8,
AvailableAfter = 9
} }

View File

@ -6,5 +6,6 @@ export declare enum Traders {
PEACEKEEPER = "5935c25fb3acc3127c3d8cd9", PEACEKEEPER = "5935c25fb3acc3127c3d8cd9",
MECHANIC = "5a7c2eca46aef81a7ca2145d", MECHANIC = "5a7c2eca46aef81a7ca2145d",
RAGMAN = "5ac3b934156ae10c4430e83c", RAGMAN = "5ac3b934156ae10c4430e83c",
JAEGER = "5c0647fdd443bc2504c2d371" JAEGER = "5c0647fdd443bc2504c2d371",
LIGHTHOUSEKEEPER = "638f541a29ffd1183d187f57"
} }

View File

@ -3,7 +3,8 @@ import { Item } from "../../eft/common/tables/IItem";
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
export declare class GenerateWeaponResult { export declare class GenerateWeaponResult {
weapon: Item[]; weapon: Item[];
chosenAmmo: string; chosenAmmoTpl: string;
chosenUbglAmmoTpl: string;
weaponMods: Mods; weaponMods: Mods;
weaponTemplate: ITemplateItem; weaponTemplate: ITemplateItem;
} }

View File

@ -1,25 +0,0 @@
import { IStartOfflineRaidRequestData } from "../../eft/match/IStartOffineRaidRequestData";
import { IEndOfflineRaidRequestData } from "../../eft/match/IEndOfflineRaidRequestData";
import { INullResponseData } from "../../eft/httpResponse/INullResponseData";
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
import { IPmcData } from "../../eft/common/IPmcData";
export interface IMatchCallbacks {
updatePing(url: string, info: any, sessionID: string): INullResponseData;
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
exitToMenu(url: string, info: any, sessionID: string): INullResponseData;
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
stopGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
getProfile(url: string, info: any, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
getGroupStatus(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
}

View File

@ -6,6 +6,8 @@ export interface IAirdropConfig extends IBaseConfig {
planeMinFlyHeight: number; planeMinFlyHeight: number;
planeMaxFlyHeight: number; planeMaxFlyHeight: number;
planeVolume: number; planeVolume: number;
planeSpeed: number;
crateFallSpeed: number;
airdropMinStartTimeSeconds: number; airdropMinStartTimeSeconds: number;
airdropMaxStartTimeSeconds: number; airdropMaxStartTimeSeconds: number;
loot: AirdropLoot; loot: AirdropLoot;
@ -17,6 +19,7 @@ export interface AirdropChancePercent {
shoreline: number; shoreline: number;
interchange: number; interchange: number;
reserve: number; reserve: number;
tarkovStreets: number;
} }
export interface AirdropLoot { export interface AirdropLoot {
presetCount: MinMax; presetCount: MinMax;

View File

@ -84,6 +84,7 @@ export interface ModLimits {
} }
export interface RandomisationDetails { export interface RandomisationDetails {
levelRange: MinMax; levelRange: MinMax;
generation?: Record<string, MinMax>;
randomisedWeaponModSlots?: string[]; randomisedWeaponModSlots?: string[];
randomisedArmorSlots?: string[]; randomisedArmorSlots?: string[];
/** Equipment chances */ /** Equipment chances */

View File

@ -14,19 +14,9 @@ export interface IBotDurability {
} }
/** Durability values to be used when a more specific bot type cant be found */ /** Durability values to be used when a more specific bot type cant be found */
export interface DefaultDurability { export interface DefaultDurability {
armor: DefaultArmor; armor: ArmorDurability;
weapon: WeaponDurability; weapon: WeaponDurability;
} }
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability { export interface PmcDurability {
armor: PmcDurabilityArmor; armor: PmcDurabilityArmor;
weapon: WeaponDurability; weapon: WeaponDurability;
@ -44,4 +34,12 @@ export interface BotDurability {
export interface ArmorDurability { export interface ArmorDurability {
maxDelta: number; maxDelta: number;
minDelta: number; minDelta: number;
minLimitPercent: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
minLimitPercent: number;
} }

View File

@ -8,4 +8,5 @@ export interface IHideoutConfig extends IBaseConfig {
airFilterUnitFlowRate: number; airFilterUnitFlowRate: number;
/** SEE HIDEOUTHELPER BEFORE CHANGING CONFIG */ /** SEE HIDEOUTHELPER BEFORE CHANGING CONFIG */
gpuBoostRate: number; gpuBoostRate: number;
hideoutWallAppearTimeSeconds: number;
} }

View File

@ -2,11 +2,16 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas
import { IBaseConfig } from "./IBaseConfig"; import { IBaseConfig } from "./IBaseConfig";
export interface ILocationConfig extends IBaseConfig { export interface ILocationConfig extends IBaseConfig {
kind: "aki-location"; kind: "aki-location";
fixEmptyBotWaves: boolean;
fixRoguesTakingAllSpawnsOnLighthouse: boolean;
lighthouseRogueSpawnTimeSeconds: number;
looseLootMultiplier: LootMultiplier; looseLootMultiplier: LootMultiplier;
staticLootMultiplier: LootMultiplier; staticLootMultiplier: LootMultiplier;
customWaves: CustomWaves; customWaves: CustomWaves;
/** Open zones to add to map */ /** Open zones to add to map */
openZones: Record<string, string[]>; openZones: Record<string, string[]>;
/** Key = map id, value = item tpls that should only have one forced loot spawn position */
forcedLootSingleSpawnById: Record<string, string[]>;
} }
export interface CustomWaves { export interface CustomWaves {
boss: Record<string, BossLocationSpawn[]>; boss: Record<string, BossLocationSpawn[]>;

View File

@ -1,7 +1,27 @@
import { MinMax } from "../../../models/common/MinMax";
import { IBaseConfig } from "./IBaseConfig"; import { IBaseConfig } from "./IBaseConfig";
export interface IRepairConfig extends IBaseConfig { export interface IRepairConfig extends IBaseConfig {
kind: "aki-repair"; kind: "aki-repair";
priceMultiplier: number; priceMultiplier: number;
applyRandomizeDurabilityLoss: boolean; applyRandomizeDurabilityLoss: boolean;
weaponSkillRepairGain: number; weaponSkillRepairGain: number;
armorKitSkillPointGainPerRepairPointMultiplier: number;
repairKit: RepairKit;
}
export interface RepairKit {
armorChancePercent: number;
weaponChancePercent: number;
armor: BonusSettings;
weapon: BonusSettings;
}
export interface BonusSettings {
rarityWeight: Record<string, number>;
bonusTypeWeight: Record<string, number>;
common: Record<string, BonusValues>;
rare: Record<string, BonusValues>;
}
export interface BonusValues {
valuesMinMax: MinMax;
/** What dura is buff active between (min max of current max) */
activeDurabilityPercentMinMax: MinMax;
} }

View File

@ -5,6 +5,7 @@ export interface ISeasonalEventConfig extends IBaseConfig {
/** event / botType / equipSlot / itemid */ /** event / botType / equipSlot / itemid */
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>; eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
events: ISeasonalEvent[]; events: ISeasonalEvent[];
gifterSettings: GifterSetting[];
} }
export interface ISeasonalEvent { export interface ISeasonalEvent {
name: string; name: string;
@ -13,3 +14,8 @@ export interface ISeasonalEvent {
endDay: number; endDay: number;
endMonth: number; endMonth: number;
} }
export interface GifterSetting {
map: string;
zones: string;
spawnChance: number;
}

View File

@ -15,15 +15,21 @@ export interface UpdateTime {
seconds: number; seconds: number;
} }
export interface FenceConfig { export interface FenceConfig {
discountOptions: DiscountOptions;
partialRefreshTimeSeconds: number; partialRefreshTimeSeconds: number;
partialRefreshChangePercent: number; partialRefreshChangePercent: number;
assortSize: number; assortSize: number;
maxPresetsPercent: number; maxPresetsPercent: number;
itemPriceMult: number;
presetPriceMult: number; presetPriceMult: number;
armorMaxDurabilityPercentMinMax: MinMax; armorMaxDurabilityPercentMinMax: MinMax;
presetMaxDurabilityPercentMinMax: MinMax; presetMaxDurabilityPercentMinMax: MinMax;
itemPriceMult: number;
regenerateAssortsOnRefresh: boolean;
itemTypeLimits: Record<string, number>; itemTypeLimits: Record<string, number>;
regenerateAssortsOnRefresh: boolean;
blacklist: string[]; blacklist: string[];
} }
export interface DiscountOptions {
assortSize: number;
itemPriceMult: number;
presetPriceMult: number;
}

View File

@ -1,3 +1,4 @@
import { IQteData } from "../../../models/eft/hideout/IQteData";
import { IGlobals } from "../../eft/common/IGlobals"; import { IGlobals } from "../../eft/common/IGlobals";
import { IBotBase } from "../../eft/common/tables/IBotBase"; import { IBotBase } from "../../eft/common/tables/IBotBase";
import { IBotCore } from "../../eft/common/tables/IBotCore"; import { IBotCore } from "../../eft/common/tables/IBotCore";
@ -30,6 +31,7 @@ export interface IDatabaseTables {
production: IHideoutProduction[]; production: IHideoutProduction[];
scavcase: IHideoutScavCase[]; scavcase: IHideoutScavCase[];
settings: IHideoutSettingsBase; settings: IHideoutSettingsBase;
qte: IQteData[];
}; };
locales?: ILocaleBase; locales?: ILocaleBase;
locations?: ILocations; locations?: ILocations;
@ -38,7 +40,7 @@ export interface IDatabaseTables {
templates?: { templates?: {
character: string[]; character: string[];
items: Record<string, ITemplateItem>; items: Record<string, ITemplateItem>;
quests: IQuest[]; quests: Record<string, IQuest>;
repeatableQuests: IRepeatableQuestDatabase; repeatableQuests: IRepeatableQuestDatabase;
/** DEPRECATED - Items file found in the client, massivly out of date compared to templates.items, try not to use this, remove ASAP*/ /** DEPRECATED - Items file found in the client, massivly out of date compared to templates.items, try not to use this, remove ASAP*/
clientItems: Record<string, ITemplateItem>; clientItems: Record<string, ITemplateItem>;

View File

@ -1,11 +1,32 @@
import { JsonUtil } from "../utils/JsonUtil";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class EventOutputHolder { export declare class EventOutputHolder {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper); protected timeUtil: TimeUtil;
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil);
protected output: IItemEventRouterResponse; protected output: IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse;
/**
* Reset the response object to a default state
* Occurs prior to event being handled by server
* @param sessionID Players id
*/
resetOutput(sessionID: string): void; resetOutput(sessionID: string): void;
/**
* Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true
* @param pmcData Player profile
* @returns dictionary of hideout improvements
*/
protected getImprovementsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, IHideoutImprovement>;
/**
* Return all productions from player profile, adjust completed productions' inprogress property to be false
* @param pmcData Player profile
* @returns dictionary of hideout productions
*/
protected getProductionsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, Productive>;
} }

View File

@ -1,10 +1,12 @@
import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks";
import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks"; import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks";
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router"; import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
import { IPmcData } from "../../models/eft/common/IPmcData"; import { IPmcData } from "../../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
export declare class InventoryItemEventRouter extends ItemEventRouterDefinition { export declare class InventoryItemEventRouter extends ItemEventRouterDefinition {
protected inventoryCallbacks: InventoryCallbacks; protected inventoryCallbacks: InventoryCallbacks;
constructor(inventoryCallbacks: InventoryCallbacks); protected hideoutCallbacks: HideoutCallbacks;
constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks);
getHandledRoutes(): HandledRoute[]; getHandledRoutes(): HandledRoute[];
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
} }

View File

@ -14,17 +14,71 @@ export declare class SaveServer {
protected logger: ILogger; protected logger: ILogger;
protected profileFilepath: string; protected profileFilepath: string;
protected profiles: {}; protected profiles: {};
protected onSave: {}; protected onBeforeSaveCallbacks: {};
protected saveMd5: {}; protected saveMd5: {};
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger); constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger);
/**
* Add callback to occur prior to saving profile changes
* @param id Id for save callback
* @param callback Callback to execute prior to running SaveServer.saveProfile()
*/
addBeforeSaveCallback(id: string, callback: (profile: Partial<IAkiProfile>) => Partial<IAkiProfile>): void;
/**
* Remove a callback from being executed prior to saving profile in SaveServer.saveProfile()
* @param id Id of callback to remove
*/
removeBeforeSaveCallback(id: string): void;
/**
* Load all profiles in /user/profiles folder into memory (this.profiles)
*/
load(): void; load(): void;
/**
* Save changes for each profile from memory into user/profiles json
*/
save(): void; save(): void;
/**
* Get a player profile from memory
* @param sessionId Session id
* @returns IAkiProfile
*/
getProfile(sessionId: string): IAkiProfile; getProfile(sessionId: string): IAkiProfile;
/**
* Get all profiles from memory
* @returns Dictionary of IAkiProfile
*/
getProfiles(): Record<string, IAkiProfile>; getProfiles(): Record<string, IAkiProfile>;
/**
* Delete a profile by id
* @param sessionID Id of profile to remove
* @returns true when deleted, false when profile not found
*/
deleteProfileById(sessionID: string): boolean; deleteProfileById(sessionID: string): boolean;
/**
* Create a new profile in memory with empty pmc/scav objects
* @param profileInfo Basic profile data
*/
createProfile(profileInfo: Info): void; createProfile(profileInfo: Info): void;
/**
* Add full profile in memory by key (info.id)
* @param profileDetails Profile to save
*/
addProfile(profileDetails: IAkiProfile): void; addProfile(profileDetails: IAkiProfile): void;
/**
* Look up profile json in user/profiles by id and store in memory
* Execute saveLoadRouters callbacks after being loaded into memory
* @param sessionID Id of profile to store in memory
*/
loadProfile(sessionID: string): void; loadProfile(sessionID: string): void;
/**
* Save changes from in-memory profile to user/profiles json
* Execute onBeforeSaveCallbacks callbacks prior to being saved to json
* @param sessionID profile id (user/profiles/id.json)
*/
saveProfile(sessionID: string): void; saveProfile(sessionID: string): void;
/**
* Remove a physical profile json from user/profiles
* @param sessionID Profile id to remove
* @returns true if file no longer exists
*/
removeProfile(sessionID: string): boolean; removeProfile(sessionID: string): boolean;
} }

View File

@ -24,5 +24,6 @@ export declare class AkiHttpListener implements IHttpListener {
sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void;
getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string;
protected getBodyInfo(body: Buffer): string; protected getBodyInfo(body: Buffer): string;
sendJson(resp: ServerResponse, output: any, sessionID: string): void;
sendZlibJson(resp: ServerResponse, output: any, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: any, sessionID: string): void;
} }

View File

@ -1,5 +1,6 @@
import { BotHelper } from "../helpers/BotHelper"; import { BotHelper } from "../helpers/BotHelper";
import { EquipmentChances, IBotType, ModsChances } from "../models/eft/common/tables/IBotType"; import { MinMax } from "../models/common/MinMax";
import { EquipmentChances, Generation, IBotType, ModsChances } from "../models/eft/common/tables/IBotType";
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig"; import { AdjustmentDetails, EquipmentFilterDetails, EquipmentFilters, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -24,6 +25,12 @@ export declare class BotEquipmentFilterService {
* @param baseValues Values to update * @param baseValues Values to update
*/ */
protected adjustChances(equipmentChanges: Record<string, number>, baseValues: EquipmentChances | ModsChances): void; protected adjustChances(equipmentChanges: Record<string, number>, baseValues: EquipmentChances | ModsChances): void;
/**
* Iterate over the Generation changes and alter data in baseValues.Generation
* @param generationChanges Changes to apply
* @param baseBotGeneration dictionary to update
*/
protected adjustGenerationChances(generationChanges: Record<string, MinMax>, baseBotGeneration: Generation): void;
/** /**
* Get equipment settings for bot * Get equipment settings for bot
* @param botEquipmentRole equipment role to return * @param botEquipmentRole equipment role to return

View File

@ -1,7 +1,7 @@
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper"; import { PresetHelper } from "../helpers/PresetHelper";
import { FenceLevel } from "../models/eft/common/IGlobals"; import { FenceLevel, Preset } from "../models/eft/common/IGlobals";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
@ -34,10 +34,12 @@ export declare class FenceService {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected fenceAssort: ITraderAssort; protected fenceAssort: ITraderAssort;
protected fenceDiscountAssort: ITraderAssort;
protected traderConfig: ITraderConfig; protected traderConfig: ITraderConfig;
protected nextMiniRefreshTimestamp: number; protected nextMiniRefreshTimestamp: number;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, localisationService: LocalisationService, configServer: ConfigServer);
protected setFenceAssort(fenceAssort: ITraderAssort): void; protected setFenceAssort(assort: ITraderAssort): void;
protected setFenceDiscountAssort(assort: ITraderAssort): void;
/** /**
* Get assorts player can purchase * Get assorts player can purchase
* Adjust prices based on fence level of player * Adjust prices based on fence level of player
@ -46,12 +48,27 @@ export declare class FenceService {
*/ */
getFenceAssorts(pmcProfile: IPmcData): ITraderAssort; getFenceAssorts(pmcProfile: IPmcData): ITraderAssort;
/** /**
* Adjust assorts price by a modifier * Adjust all items contained inside an assort by a multiplier
* @param item * @param assort Assort that contains items with prices to adjust
* @param assort * @param itemMultipler multipler to use on items
* @param modifier * @param presetMultiplier preset multipler to use on presets
*/ */
protected adjustItemPriceByModifier(item: Item, assort: ITraderAssort, modifier: number): void; protected adjustAssortItemPrices(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void;
/**
* Merge two trader assort files together
* @param firstAssort assort 1#
* @param secondAssort assort #2
* @returns merged assort
*/
protected mergeAssorts(firstAssort: ITraderAssort, secondAssort: ITraderAssort): ITraderAssort;
/**
* Adjust assorts price by a modifier
* @param item assort item details
* @param assort assort to be modified
* @param modifier value to multiply item price by
* @param presetModifier value to multiply preset price by
*/
protected adjustItemPriceByModifier(item: Item, assort: ITraderAssort, modifier: number, presetModifier: number): void;
/** /**
* Get fence assorts with no price adjustments based on fence rep * Get fence assorts with no price adjustments based on fence rep
* @returns ITraderAssort * @returns ITraderAssort
@ -80,7 +97,7 @@ export declare class FenceService {
/** /**
* Choose an item (not mod) at random and remove from assorts * Choose an item (not mod) at random and remove from assorts
*/ */
protected removeRandomItemFromAssorts(): void; protected removeRandomItemFromAssorts(assort: ITraderAssort): void;
/** /**
* Get an integer rounded count of items to replace based on percentrage from traderConfig value * Get an integer rounded count of items to replace based on percentrage from traderConfig value
* @param totalItemCount total item count * @param totalItemCount total item count
@ -102,11 +119,23 @@ export declare class FenceService {
*/ */
protected createBaseTraderAssortItem(): ITraderAssort; protected createBaseTraderAssortItem(): ITraderAssort;
/** /**
* Hydrate result parameter object with generated assorts * Hydrate assorts parameter object with generated assorts
* @param assortCount Number of assorts to generate * @param assortCount Number of assorts to generate
* @param assorts object to add assorts to * @param assorts object to add created assorts to
*/ */
protected createAssorts(assortCount: number, assorts: ITraderAssort): void; protected createAssorts(assortCount: number, assorts: ITraderAssort, loyaltyLevel: number): void;
protected addItemAssorts(assortCount: number, fenceAssortIds: string[], assorts: ITraderAssort, fenceAssort: ITraderAssort, itemTypeCounts: Record<string, {
current: number;
max: number;
}>, loyaltyLevel: number): void;
/**
* Add preset weapons to fence presets
* @param assortCount how many assorts to add to assorts
* @param defaultWeaponPresets
* @param assorts object to add presets to
* @param loyaltyLevel
*/
protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record<string, Preset>, assorts: ITraderAssort, loyaltyLevel: number): void;
/** /**
* Randomise items' upd properties e.g. med packs/weapons/armor * Randomise items' upd properties e.g. med packs/weapons/armor
* @param itemDetails Item being randomised * @param itemDetails Item being randomised

View File

@ -25,12 +25,12 @@ export declare class PaymentService {
constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
/** /**
* Take money and insert items into return to server request * Take money and insert items into return to server request
* @param {Object} pmcData * @param {IPmcData} pmcData Player profile
* @param {Object} body * @param {IProcessBuyTradeRequestData} request
* @param {string} sessionID * @param {string} sessionID
* @returns Object * @returns Object
*/ */
payMoney(pmcData: IPmcData, body: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Receive money back after selling * Receive money back after selling
* @param {IPmcData} pmcData * @param {IPmcData} pmcData
@ -62,7 +62,15 @@ export declare class PaymentService {
* Post-raid healing would often take money out of the players pockets/secure container * Post-raid healing would often take money out of the players pockets/secure container
* @param a First money stack item * @param a First money stack item
* @param b Second money stack item * @param b Second money stack item
* @param inventoryItems players inventory items
* @returns sort order * @returns sort order
*/ */
protected prioritiseStashSort(a: Item, b: Item): number; protected prioritiseStashSort(a: Item, b: Item, inventoryItems: Item[]): number;
/**
* Recursivly check items parents to see if it is inside the players inventory, not stash
* @param itemId item id to check
* @param inventoryItems player inventory
* @returns true if its in inventory
*/
protected isInInventory(itemId: string, inventoryItems: Item[]): boolean;
} }

View File

@ -7,6 +7,7 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { HideoutAreas } from "../models/enums/HideoutAreas"; import { HideoutAreas } from "../models/enums/HideoutAreas";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { TimeUtil } from "../utils/TimeUtil";
import { Watermark } from "../utils/Watermark"; import { Watermark } from "../utils/Watermark";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class ProfileFixerService { export declare class ProfileFixerService {
@ -14,8 +15,9 @@ export declare class ProfileFixerService {
protected watermark: Watermark; protected watermark: Watermark;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, localisationService: LocalisationService, timeUtil: TimeUtil, databaseServer: DatabaseServer);
/** /**
* Find issues in the pmc profile data that may cause issues and fix them * Find issues in the pmc profile data that may cause issues and fix them
* @param pmcProfile profile to check and fix * @param pmcProfile profile to check and fix
@ -32,6 +34,8 @@ export declare class ProfileFixerService {
* @param pmcProfile profile to remove old counters from * @param pmcProfile profile to remove old counters from
*/ */
removeDanglingConditionCounters(pmcProfile: IPmcData): void; removeDanglingConditionCounters(pmcProfile: IPmcData): void;
addLighthouseKeeperIfMissing(pmcProfile: IPmcData): void;
protected addUnlockedInfoObjectIfMissing(pmcProfile: IPmcData): void;
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[]; protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[];
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
@ -45,6 +49,11 @@ export declare class ProfileFixerService {
protected updateProfileQuestDataValues(pmcProfile: IPmcData): void; protected updateProfileQuestDataValues(pmcProfile: IPmcData): void;
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void; protected addMissingWorkbenchWeaponSkills(pmcProfile: IPmcData): void;
/**
* Some profiles have hideout maxed and therefore no improvements
* @param pmcProfile Profile to add improvement data to
*/
protected addMissingWallImprovements(pmcProfile: IPmcData): void;
/** /**
* A new property was added to slot items "locationIndex", if this is missing, the hideout slot item must be removed * A new property was added to slot items "locationIndex", if this is missing, the hideout slot item must be removed
* @param pmcProfile Profile to find and remove slots from * @param pmcProfile Profile to find and remove slots from
@ -85,4 +94,14 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to check inventory of * @param pmcProfile Profile to check inventory of
*/ */
checkForOrphanedModdedItems(pmcProfile: IPmcData): void; checkForOrphanedModdedItems(pmcProfile: IPmcData): void;
/**
* Add `Improvements` object to hideout if missing - added in eft 13.0.21469
* @param pmcProfile profile to update
*/
addMissingUpgradesPropertyToHideout(pmcProfile: IPmcData): void;
/**
* Iterate over associated profile template and check all hideout areas exist, add if not
* @param fullProfile Profile to update
*/
addMissingHideoutAreasToProfile(fullProfile: IAkiProfile): void;
} }

View File

@ -65,6 +65,7 @@ export declare class RagfairPriceService implements OnLoad {
* @returns Dictionary of item tpls and rouble cost * @returns Dictionary of item tpls and rouble cost
*/ */
getAllFleaPrices(): Record<string, number>; getAllFleaPrices(): Record<string, number>;
getAllStaticPrices(): Record<string, number>;
/** /**
* Get the percentage difference between two values * Get the percentage difference between two values
* @param a numerical value a * @param a numerical value a

View File

@ -1,27 +1,33 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { RepairHelper } from "../helpers/RepairHelper"; import { RepairHelper } from "../helpers/RepairHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { RepairKitsInfo } from "../models/eft/repair/IRepairActionDataRequest"; import { RepairKitsInfo } from "../models/eft/repair/IRepairActionDataRequest";
import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest"; import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { BonusSettings, IRepairConfig } from "../models/spt/config/IRepairConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RandomUtil } from "../utils/RandomUtil";
import { PaymentService } from "./PaymentService"; import { PaymentService } from "./PaymentService";
export declare class RepairService { export declare class RepairService {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected weightedRandomHelper: WeightedRandomHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected repairHelper: RepairHelper; protected repairHelper: RepairHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
repairConfig: IRepairConfig; repairConfig: IRepairConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
/** /**
* Use trader to repair an items durability * Use trader to repair an items durability
* @param sessionID Session id * @param sessionID Session id
@ -65,9 +71,22 @@ export declare class RepairService {
* @param repairKitInInventory Repair kit to update * @param repairKitInInventory Repair kit to update
*/ */
protected addMaxResourceToKitIfMissing(repairKitDetails: ITemplateItem, repairKitInInventory: Item): void; protected addMaxResourceToKitIfMissing(repairKitDetails: ITemplateItem, repairKitInInventory: Item): void;
/**
* Chance to apply buff to an item (Armor/weapon) if repaired by armor kit
* @param repairDetails repair details of item
*/
addBuffToItem(repairDetails: RepairDetails): void;
/**
* Add buff to item
* @param itemConfig weapon/armor config
* @param repairDetails Details for item to repair
*/
protected addBuff(itemConfig: BonusSettings, repairDetails: RepairDetails): void;
} }
export declare class RepairDetails { export declare class RepairDetails {
repairCost?: number; repairCost?: number;
repairedItem: Item; repairedItem: Item;
repairedItemIsArmor: boolean; repairedItemIsArmor: boolean;
repairAmount: number;
repairedByKit: boolean;
} }

View File

@ -59,6 +59,10 @@ export declare class SeasonalEventService {
* @param eventName Name of the event to enable. e.g. Christmas * @param eventName Name of the event to enable. e.g. Christmas
*/ */
protected updateGlobalEvents(globalConfig: Config, eventName: string): void; protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
/**
* Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property
*/
protected addLootItemsToGifterDropItemsList(): void;
/** /**
* Read in data from seasonalEvents.json and add found equipment items to bots * Read in data from seasonalEvents.json and add found equipment items to bots
* @param eventName Name of the event to read equipment in from config * @param eventName Name of the event to read equipment in from config
@ -69,4 +73,8 @@ export declare class SeasonalEventService {
* Set Khorovod(dancing tree) chance to 100% on all maps that support it * Set Khorovod(dancing tree) chance to 100% on all maps that support it
*/ */
protected enableDancingTree(): void; protected enableDancingTree(): void;
/**
* Add santa to maps
*/
protected addGifterBotToMaps(): void;
} }

View File

@ -110,6 +110,7 @@ export declare class RandomUtil {
getIntEx(max: number): number; getIntEx(max: number): number;
getFloat(min: number, max: number): number; getFloat(min: number, max: number): number;
getBool(): boolean; getBool(): boolean;
getPercentOfValue(percent: number, number: number, toFixed?: number): number;
/** /**
* Check if number passes a check out of 100 * Check if number passes a check out of 100
* @param chancePercent value check needs to be above * @param chancePercent value check needs to be above

View File

@ -32,7 +32,7 @@ export declare class VFS {
createDirAsync(filepath: string): Promise<void>; createDirAsync(filepath: string): Promise<void>;
copyDir(filepath: string, target: string, fileExtensions?: string | string[]): void; copyDir(filepath: string, target: string, fileExtensions?: string | string[]): void;
copyDirAsync(filepath: string, target: string, fileExtensions: string | string[]): Promise<void>; copyDirAsync(filepath: string, target: string, fileExtensions: string | string[]): Promise<void>;
readFile(filepath: string): any; readFile(...args: Parameters<typeof fs.readFileSync>): any;
readFileAsync(filepath: string): Promise<any>; readFileAsync(filepath: string): Promise<any>;
writeFile(filepath: any, data?: string, append?: boolean, atomic?: boolean): void; writeFile(filepath: any, data?: string, append?: boolean, atomic?: boolean): void;
writeFileAsync(filepath: any, data?: string, append?: boolean, atomic?: boolean): Promise<void>; writeFileAsync(filepath: any, data?: string, append?: boolean, atomic?: boolean): Promise<void>;

View File

@ -3,7 +3,6 @@ import { BotGenerator } from "../generators/BotGenerator";
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper"; import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
import { BotHelper } from "../helpers/BotHelper"; import { BotHelper } from "../helpers/BotHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData"; import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
import { IBotBase } from "../models/eft/common/tables/IBotBase"; import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { IBotCore } from "../models/eft/common/tables/IBotCore"; import { IBotCore } from "../models/eft/common/tables/IBotCore";
@ -23,14 +22,13 @@ export declare class BotController {
protected botDifficultyHelper: BotDifficultyHelper; protected botDifficultyHelper: BotDifficultyHelper;
protected botGenerationCacheService: BotGenerationCacheService; protected botGenerationCacheService: BotGenerationCacheService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected weightedRandomHelper: WeightedRandomHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
static readonly pmcTypeLabel = "PMC"; static readonly pmcTypeLabel = "PMC";
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil); constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
/** /**
* Return the number of bot loadout varieties to be generated * Return the number of bot loadout varieties to be generated
* @param type bot Type we want the loadout gen count for * @param type bot Type we want the loadout gen count for

View File

@ -11,10 +11,13 @@ import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { LocalisationService } from "../services/LocalisationService"; import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService"; import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService"; import { SeasonalEventService } from "../services/SeasonalEventService";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
@ -28,13 +31,29 @@ export declare class GameController {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService; protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig; protected coreConfig: ICoreConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/**
* When player logs in, iterate over all active effects and reduce timer
* @param pmcProfile
*/
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
/**
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
*/
protected fixBrokenOfflineMapWaves(): void;
/**
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
*/
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
/** /**
* Get a list of installed mods and save their details to the profile being used * Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to * @param fullProfile Profile to add mod details to

View File

@ -2,25 +2,27 @@ import { HealthHelper } from "../helpers/HealthHelper";
import { InventoryHelper } from "../helpers/InventoryHelper"; import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData"; import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData"; import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData"; import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { LocalisationService } from "../services/LocalisationService"; import { LocalisationService } from "../services/LocalisationService";
import { PaymentService } from "../services/PaymentService"; import { PaymentService } from "../services/PaymentService";
import { JsonUtil } from "../utils/JsonUtil";
export declare class HealthController { export declare class HealthController {
protected logger: ILogger; protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected eventOutputHolder: EventOutputHolder; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper); constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
/** /**
* stores in-raid player health * stores in-raid player health
* @param pmcData Player profile * @param pmcData Player profile
@ -37,6 +39,13 @@ export declare class HealthController {
* @returns * @returns
*/ */
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Consume food/water outside of a raid
* @param pmcData Player profile
* @param body request Object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
@ -54,10 +63,11 @@ export declare class HealthController {
*/ */
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void; applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
/** /**
* iterate over treatment request diff and find effects to remove from player limbs * Iterate over treatment request diff and find effects to remove from player limbs
* @param sessionId * @param sessionId
* @param profile Profile to update * @param profile Profile to update
* @param treatmentRequest client request * @param treatmentRequest client request
* @param output response to send to client
*/ */
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData, output: IItemEventRouterResponse): void;
} }

View File

@ -27,6 +27,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { FenceService } from "../services/FenceService";
import { LocalisationService } from "../services/LocalisationService"; import { LocalisationService } from "../services/LocalisationService";
import { PlayerService } from "../services/PlayerService"; import { PlayerService } from "../services/PlayerService";
import { HashUtil } from "../utils/HashUtil"; import { HashUtil } from "../utils/HashUtil";
@ -53,9 +54,10 @@ export declare class HideoutController {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected fenceService: FenceService;
protected static nameBackendCountersCrafting: string; protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
/** /**
* Start a hideout area upgrade * Start a hideout area upgrade
* @param pmcData Player profile * @param pmcData Player profile
@ -122,6 +124,14 @@ export declare class HideoutController {
* @returns item event router response * @returns item event router response
*/ */
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse; scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Adjust scav case time based on fence standing
*
* @param pmcData Player profile
* @param productionTime Time to complete scav case in seconds
* @returns Adjusted scav case time in seconds
*/
protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number;
/** /**
* Add generated scav case rewards to player profile * Add generated scav case rewards to player profile
* @param pmcData player profile to add rewards to * @param pmcData player profile to add rewards to
@ -159,11 +169,11 @@ export declare class HideoutController {
* Handles giving rewards stored in player profile to player after clicking 'get rewards' * Handles giving rewards stored in player profile to player after clicking 'get rewards'
* @param sessionID Session id * @param sessionID Session id
* @param pmcData Player profile * @param pmcData Player profile
* @param body Remove production from scavcase area request * @param request Get rewards from scavcase craft request
* @param output Output object to update * @param output Output object to update
* @returns IItemEventRouterResponse * @returns IItemEventRouterResponse
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -17,9 +17,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { BotGenerationCacheService } from "../services/BotGenerationCacheService"; import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
import { BotLootCacheService } from "../services/BotLootCacheService"; import { BotLootCacheService } from "../services/BotLootCacheService";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { MatchLocationService } from "../services/MatchLocationService"; import { MatchLocationService } from "../services/MatchLocationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileSnapshotService } from "../services/ProfileSnapshotService"; import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
export declare class MatchController { export declare class MatchController {
protected logger: ILogger; protected logger: ILogger;
@ -30,14 +28,12 @@ export declare class MatchController {
protected botLootCacheService: BotLootCacheService; protected botLootCacheService: BotLootCacheService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected profileSnapshotService: ProfileSnapshotService; protected profileSnapshotService: ProfileSnapshotService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected botGenerationCacheService: BotGenerationCacheService; protected botGenerationCacheService: BotGenerationCacheService;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
protected matchConfig: IMatchConfig; protected matchConfig: IMatchConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext); constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
getEnabled(): boolean; getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[]; getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any; createGroup(sessionID: string, info: ICreateGroupRequestData): any;

View File

@ -236,7 +236,7 @@ export declare class RepeatableQuestController {
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward; generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
debugLogRepeatableQuestIds(pmcData: IPmcData): void; debugLogRepeatableQuestIds(pmcData: IPmcData): void;
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>; probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse; changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
/** /**
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable) * Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
* @param repeatableQuestConfig config file * @param repeatableQuestConfig config file

View File

@ -145,7 +145,7 @@ export declare class BotEquipmentModGenerator {
* @param modToAdd template of mod to check * @param modToAdd template of mod to check
* @param itemSlot slot the item will be placed in * @param itemSlot slot the item will be placed in
* @param modSlot slot the mod will fill * @param modSlot slot the mod will fill
* @param parentTemplate tempalte of the mods parent item * @param parentTemplate template of the mods parent item
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;

View File

@ -102,6 +102,13 @@ export declare class BotWeaponGenerator {
* @param botRole The bot type we're getting generating extra mags for * @param botRole The bot type we're getting generating extra mags for
*/ */
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void; addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
/**
* Add Grendaes for UBGL to bots vest and secure container
* @param weaponMods Weapon array with mods
* @param generatedWeaponResult result of weapon generation
* @param inventory bot inventory to add grenades to
*/
protected addUbglGrenadesToBotInventory(weaponMods: Item[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void;
/** /**
* Add ammo to the secure container * Add ammo to the secure container
* @param stackCount How many stacks of ammo to add * @param stackCount How many stacks of ammo to add
@ -138,6 +145,13 @@ export declare class BotWeaponGenerator {
* @param ammoTpl * @param ammoTpl
*/ */
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void; protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
/**
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
* @param weaponMods
* @param ubglMod
* @param ubglAmmoTpl
*/
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
/** /**
* Add cartridge item to weapon Item array, if it already exists, update * Add cartridge item to weapon Item array, if it already exists, update
* @param weaponMods Weapon items array to amend * @param weaponMods Weapon items array to amend

View File

@ -3,6 +3,7 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService"; import { ItemFilterService } from "../services/ItemFilterService";
import { SeasonalEventService } from "../services/SeasonalEventService";
/** /**
* Handle the generation of dynamic PMC loot in pockets and backpacks * Handle the generation of dynamic PMC loot in pockets and backpacks
* and the removal of blacklisted items * and the removal of blacklisted items
@ -12,10 +13,19 @@ export declare class PMCLootGenerator {
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected seasonalEventService: SeasonalEventService;
protected pocketLootPool: string[]; protected pocketLootPool: string[];
protected backpackLootPool: string[]; protected backpackLootPool: string[];
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService); constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
/**
* Create an array of loot items a PMC can have in their pockets
* @returns string array of tpls
*/
generatePMCPocketLootPool(): string[]; generatePMCPocketLootPool(): string[];
/**
* Create an array of loot items a PMC can have in their backpack
* @returns string array of tpls
*/
generatePMCBackpackLootPool(): string[]; generatePMCBackpackLootPool(): string[];
} }

View File

@ -4,6 +4,7 @@ import { Item } from "../models/eft/common/tables/IItem";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { HashUtil } from "../utils/HashUtil"; import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairAssortGenerator { export declare class RagfairAssortGenerator {
@ -11,10 +12,11 @@ export declare class RagfairAssortGenerator {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected seasonalEventService: SeasonalEventService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected generatedAssortItems: Item[]; protected generatedAssortItems: Item[];
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer); constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
/** /**
* Get an array of unique items that can be sold on the flea * Get an array of unique items that can be sold on the flea
* @returns array of unique items * @returns array of unique items

View File

@ -0,0 +1,10 @@
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
import { IInventoryMagGen } from "../IInventoryMagGen";
import { InventoryMagGen } from "../InventoryMagGen";
export declare class UbglExternalMagGen implements IInventoryMagGen {
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
getPriority(): number;
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
process(inventoryMagGen: InventoryMagGen): void;
}

View File

@ -17,15 +17,16 @@ export declare class AssortHelper {
* @param pmcProfile player profile * @param pmcProfile player profile
* @param traderId traders id * @param traderId traders id
* @param assort assort items from a trader * @param assort assort items from a trader
* @param mergedQuestAssorts An object of quest assort to quest id unlocks for all traders
* @returns assort items minus locked quest assorts * @returns assort items minus locked quest assorts
*/ */
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, flea?: boolean): ITraderAssort; stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
/** /**
* Remove assorts from a trader that have not been unlocked yet * Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile * @param pmcProfile player profile
* @param traderId traders id * @param traderId traders id
* @param assort traders assorts * @param assort traders assorts
* @returns traders assorts minus locked loyality assorts * @returns traders assorts minus locked loyalty assorts
*/ */
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort; stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
/** /**

View File

@ -20,7 +20,7 @@ export declare class BotDifficultyHelper {
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
/** /**
* Get difficulty settings for desired bot type, if not found use assault bot types * Get difficulty settings for desired bot type, if not found use assault bot types
* @param type bot type to retreive difficulty of * @param type bot type to retrieve difficulty of
* @param difficulty difficulty to get settings for (easy/normal etc) * @param difficulty difficulty to get settings for (easy/normal etc)
* @returns Difficulty object * @returns Difficulty object
*/ */

View File

@ -23,7 +23,7 @@ export declare class BotGeneratorHelper {
* Adds properties to an item * Adds properties to an item
* e.g. Repairable / HasHinge / Foldable / MaxDurability * e.g. Repairable / HasHinge / Foldable / MaxDurability
* @param itemTemplate Item extra properties are being generated for * @param itemTemplate Item extra properties are being generated for
* @param botRole Used by weapons to randomise the durability values. Null for non-equipped items * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
* @returns Item Upd object with extra properties * @returns Item Upd object with extra properties
*/ */
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
@ -53,10 +53,10 @@ export declare class BotGeneratorHelper {
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable; protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
/** /**
* Can item be added to another item without conflict * Can item be added to another item without conflict
* @param items Items to check compatiblilities with * @param items Items to check compatibilities with
* @param tplToCheck Tpl of the item to check for incompatibilities * @param tplToCheck Tpl of the item to check for incompatibilities
* @param equipmentSlot Slot the item will be placed into * @param equipmentSlot Slot the item will be placed into
* @returns false if no incompatibilties, also has incompatibility reason * @returns false if no incompatibilities, also has incompatibility reason
*/ */
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): { isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
incompatible: boolean; incompatible: boolean;

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