update types

This commit is contained in:
Chomp 2022-06-14 20:03:07 +01:00
parent 2f5fce4322
commit 6d6665cd82
2268 changed files with 17544 additions and 12528 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ConfigServer } from "../servers/ConfigServer";
export declare class HideoutCallbacks extends OnUpdate {
private hideoutController;
private configServer;
private hideoutConfig;
protected hideoutController: HideoutController;
protected configServer: ConfigServer;
protected hideoutConfig: IHideoutConfig;
constructor(hideoutController: HideoutController, // TODO: delay needed
configServer: ConfigServer);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;

View File

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

View File

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

View File

@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { InsuranceService } from "../services/InsuranceService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
private insuranceController;
private insuranceService;
private httpResponse;
private configServer;
private insuranceConfig;
protected insuranceController: InsuranceController;
protected insuranceService: InsuranceService;
protected httpResponse: HttpResponseUtil;
protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig;
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
onLoad(): void;
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

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

View File

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

View File

@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { Watermark } from "../utils/Watermark";
declare class LauncherCallbacks {
private httpResponse;
private launcherController;
private saveServer;
private watermark;
protected httpResponse: HttpResponseUtil;
protected launcherController: LauncherController;
protected saveServer: SaveServer;
protected watermark: Watermark;
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark);
connect(): string;
login(url: string, info: ILoginRequestData, sessionID: string): string;

View File

@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class LocationCallbacks {
private httpResponse;
private locationController;
protected httpResponse: HttpResponseUtil;
protected locationController: LocationController;
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;

View File

@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class MatchCallbacks {
private httpResponse;
private jsonUtil;
private matchController;
private databaseServer;
protected httpResponse: HttpResponseUtil;
protected jsonUtil: JsonUtil;
protected matchController: MatchController;
protected databaseServer: DatabaseServer;
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
updatePing(url: string, info: any, sessionID: string): INullResponseData;
exitMatch(url: string, info: any, sessionID: string): INullResponseData;

View File

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

View File

@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { INoteActionData } from "../models/eft/notes/INoteActionData";
export declare class NoteCallbacks {
private noteController;
protected noteController: NoteController;
constructor(noteController: NoteController);
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class NotifierCallbacks {
private httpServerHelper;
private httpResponse;
private notifierController;
protected httpServerHelper: HttpServerHelper;
protected httpResponse: HttpResponseUtil;
protected notifierController: NotifierController;
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController);
/**
* If we don't have anything to send, it's ok to not send anything back
@ -16,7 +16,7 @@ export declare class NotifierCallbacks {
* until we actually have something to send because otherwise we'd spam the client
* and the client would abort the connection due to spam.
*/
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
sendNotification(_sessionID: string, req: any, resp: any, _data: any): void;
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;

View File

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

View File

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

View File

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

View File

@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class QuestCallbacks {
private httpResponse;
private questController;
private repeatableQuestController;
protected httpResponse: HttpResponseUtil;
protected questController: QuestController;
protected repeatableQuestController: RepeatableQuestController;
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairCallbacks extends OnLoadOnUpdate {
private httpResponse;
private logger;
private jsonUtil;
private ragfairServer;
private ragfairController;
private configServer;
private ragfairConfig;
protected httpResponse: HttpResponseUtil;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected ragfairServer: RagfairServer;
protected ragfairController: RagfairController;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
onLoad(): void;
getRoute(): string;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
export declare class WishlistCallbacks {
private wishlistController;
protected wishlistController: WishlistController;
constructor(wishlistController: WishlistController);
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { IBotCore } from "../models/eft/common/tables/IBotCore";
import { Difficulty } from "../models/eft/common/tables/IBotType";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class BotController {
private databaseServer;
private botGenerator;
private botHelper;
private configServer;
private botConfig;
protected databaseServer: DatabaseServer;
protected botGenerator: BotGenerator;
protected botHelper: BotHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
/**
* Return the number of bot loadout varieties to be generated
@ -19,6 +20,7 @@ export declare class BotController {
* @returns
*/
getBotPresetGenerationLimit(type: string): number;
getBotCoreDifficulty(): IBotCore;
/**
* Get bot difficulty settings
* adjust PMC settings to ensure they engage the correct bot types
@ -26,8 +28,8 @@ export declare class BotController {
* @param difficulty difficulty level server requested settings for
* @returns Difficulty object
*/
getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty;
private getPmcDifficultySettings;
getBotDifficulty(type: string, difficulty: string): Difficulty;
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
getBotCap(): number;
}

View File

@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
export declare class CustomizationController {
private logger;
private itemEventRouter;
private databaseServer;
private saveServer;
private profileHelper;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected saveServer: SaveServer;
protected profileHelper: ProfileHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
getTraderSuits(traderID: string, sessionID: string): ISuit[];
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
private getAllTraderSuits;
protected getAllTraderSuits(sessionID: string): ISuit[];
}

View File

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

View File

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

View File

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

View File

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

View File

@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
import { PaymentHelper } from "../helpers/PaymentHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { HideoutArea, IPmcData, Product } from "../models/eft/common/IPmcData";
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
@ -14,6 +16,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class HideoutController {
private logger;
private hashUtil;
private timeUtil;
private databaseServer;
private randomUtil;
private inventoryHelper;
private saveServer;
private playerService;
private presetHelper;
private paymentHelper;
private itemEventRouter;
private httpResponse;
private profileHelper;
private hideoutHelper;
private configServer;
private hideoutConfig;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected randomUtil: RandomUtil;
protected inventoryHelper: InventoryHelper;
protected saveServer: SaveServer;
protected playerService: PlayerService;
protected presetHelper: PresetHelper;
protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter;
protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper;
protected hideoutHelper: HideoutHelper;
protected configServer: ConfigServer;
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, configServer: ConfigServer);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
protected removeItemFromGenerator(sessionID: string, pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
protected getRandomisedItemRarityCounter(recipe: IHideoutScavCase): {
[x: string]: number;
};
protected getRandomisedScavRewards(rarityItemCounter: {
[x: string]: number;
}): Product[];
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
update(): void;
}

View File

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

View File

@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class InsuranceController {
private logger;
private randomUtil;
private itemEventRouter;
private timeUtil;
private saveServer;
private databaseServer;
private itemHelper;
private profileHelper;
private dialogueHelper;
private paymentService;
private insuranceService;
private configServer;
private insuranceConfig;
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected itemEventRouter: ItemEventRouter;
protected timeUtil: TimeUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected dialogueHelper: DialogueHelper;
protected paymentService: PaymentService;
protected insuranceService: InsuranceService;
protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required
insuranceService: InsuranceService, configServer: ConfigServer);
processReturn(): void;

View File

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

View File

@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
import { Info } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { HashUtil } from "../utils/HashUtil";
export declare class LauncherController {
private hashUtil;
private saveServer;
private httpServerHelper;
private databaseServer;
private configServer;
private coreConfig;
protected hashUtil: HashUtil;
protected saveServer: SaveServer;
protected httpServerHelper: HttpServerHelper;
protected databaseServer: DatabaseServer;
protected configServer: ConfigServer;
protected coreConfig: ICoreConfig;
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
connect(): any;
find(sessionIdKey: string): Info;
login(info: ILoginRequestData): string;
register(info: IRegisterData): string;
private createAccount;
protected createAccount(info: IRegisterData): string;
changeUsername(info: IChangeRequestData): string;
changePassword(info: IChangeRequestData): string;
wipe(info: IRegisterData): string;

View File

@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class LocationController {
private jsonUtil;
private logger;
private locationGenerator;
private databaseServer;
private timeUtil;
protected jsonUtil: JsonUtil;
protected logger: ILogger;
protected locationGenerator: LocationGenerator;
protected databaseServer: DatabaseServer;
protected timeUtil: TimeUtil;
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
get(location: string): ILocationBase;
generate(name: string): ILocationBase;

View File

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

View File

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

View File

@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService";
import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
export declare class NotifierController {
private notifierHelper;
private httpServerHelper;
private notificationService;
private pollInterval;
private timeout;
protected notifierHelper: NotifierHelper;
protected httpServerHelper: HttpServerHelper;
protected notificationService: NotificationService;
protected pollInterval: number;
protected timeout: number;
constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService);
/**
* Resolve an array of session notifications.

View File

@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
import { SaveServer } from "../servers/SaveServer";
import { HashUtil } from "../utils/HashUtil";
export declare class PresetBuildController {
private hashUtil;
private itemEventRouter;
private itemHelper;
private saveServer;
protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter;
protected itemHelper: ItemHelper;
protected saveServer: SaveServer;
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
getUserBuilds(sessionID: string): WeaponBuild[];
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;

View File

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

View File

@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer";
import { HashUtil } from "../utils/HashUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class ProfileController {
private hashUtil;
private timeUtil;
private saveServer;
private databaseServer;
private itemHelper;
private traderHelper;
private extendedProfileHelper;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected traderHelper: TraderHelper;
protected extendedProfileHelper: ExtendedProfileHelper;
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
getMiniProfiles(): IMiniProfile[];
getMiniProfile(sessionID: string): any;

View File

@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IQuest } from "../models/eft/common/tables/IQuest";
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { PlayerService } from "../services/PlayerService";
import { TimeUtil } from "../utils/TimeUtil";
export declare class QuestController {
private logger;
private timeUtil;
private itemEventRouter;
private databaseServer;
private itemHelper;
private dialogueHelper;
private profileHelper;
private questHelper;
private questConditionHelper;
private playerService;
private configServer;
private questConfig;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper;
protected profileHelper: ProfileHelper;
protected questHelper: QuestHelper;
protected questConditionHelper: QuestConditionHelper;
protected playerService: PlayerService;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, configServer: ConfigServer);
/**
* Get all quests visible to player
* Exclude quests with incomplete preconditions (level/loyalty)
* @param sessionID session id
* @returns array of IQuest
*/
getClientQuests(sessionID: string): IQuest[];
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Remove completed quest from profile
* Add newly unlocked quests to profile
* Also recalculate thier level due to exp rewards
* @param pmcData Player profile
* @param body completed quest request
* @param sessionID session id
* @returns ItemEvent response
*/
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Send a popup to player on completion of a quest
* @param sessionID session id
* @param pmcData player profile
* @param completedQuestId completed quest id
* @param questRewards rewards given to player
*/
protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
/**
* Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id
* @returns array of quests
*/
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
/**
* Fail the quests provided
* @param sessionID session id
* @param pmcData player profile
* @param questsToFail quests to fail
*/
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class RagfairController {
private logger;
private timeUtil;
private httpResponse;
private itemEventRouter;
private ragfairServer;
private ragfairPriceService;
private databaseServer;
private itemHelper;
private saveServer;
private ragfairSellHelper;
private ragfairTaxHelper;
private ragfairSortHelper;
private ragfairOfferHelper;
private profileHelper;
private paymentService;
private handbookHelper;
private paymentHelper;
private inventoryHelper;
private ragfairHelper;
private ragfairOfferService;
private ragfairRequiredItemsService;
private ragfairOfferGenerator;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil;
protected itemEventRouter: ItemEventRouter;
protected ragfairServer: RagfairServer;
protected ragfairPriceService: RagfairPriceService;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected saveServer: SaveServer;
protected ragfairSellHelper: RagfairSellHelper;
protected ragfairTaxHelper: RagfairTaxHelper;
protected ragfairSortHelper: RagfairSortHelper;
protected ragfairOfferHelper: RagfairOfferHelper;
protected profileHelper: ProfileHelper;
protected paymentService: PaymentService;
protected handbookHelper: HandbookHelper;
protected paymentHelper: PaymentHelper;
protected inventoryHelper: InventoryHelper;
protected ragfairHelper: RagfairHelper;
protected ragfairOfferService: RagfairOfferService;
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
protected ragfairOfferGenerator: RagfairOfferGenerator;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
update(): void;

View File

@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "../services/PaymentService";
export declare class RepairController {
private logger;
private itemEventRouter;
private databaseServer;
private questHelper;
private traderHelper;
private paymentService;
private repairHelper;
private configServer;
private repairConfig;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper;
protected traderHelper: TraderHelper;
protected paymentService: PaymentService;
protected repairHelper: RepairHelper;
protected configServer: ConfigServer;
protected repairConfig: IRepairConfig;
protected readonly WEAPON_SKILL_REPAIR_GAIN: number;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
/**
* Repair with trader
@ -36,5 +38,5 @@ export declare class RepairController {
* @param sessionID session id
* @returns item event router action
*/
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
}

View File

@ -1,3 +1,4 @@
import { GameHelper } from "../helpers/GameHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
import { ELocationName } from "../models/enums/ELocationName";
import { IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -48,22 +49,23 @@ export interface ITargetLocation {
locations: string[];
}
export declare class RepeatableQuestController {
private timeUtil;
private logger;
private randomUtil;
private mathUtil;
private jsonUtil;
private databaseServer;
private itemHelper;
private presetHelper;
private profileHelper;
private ragfairServerHelper;
private itemEventRouter;
private paymentService;
private objectId;
private configServer;
private questConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
protected timeUtil: TimeUtil;
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected mathUtil: MathUtil;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected presetHelper: PresetHelper;
protected profileHelper: ProfileHelper;
protected gameHelper: GameHelper;
protected ragfairServerHelper: RagfairServerHelper;
protected itemEventRouter: ItemEventRouter;
protected paymentService: PaymentService;
protected objectId: ObjectId;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, gameHelper: GameHelper, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, configServer: ConfigServer);
/**
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
* Returns an array of objects in the format of repeatable quests to the client.

View File

@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
declare class TradeController {
private logger;
private itemEventRouter;
private tradeHelper;
private profileHelper;
private ragfairServer;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected tradeHelper: TradeHelper;
protected profileHelper: ProfileHelper;
protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;

View File

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

View File

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

View File

@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class WishlistController {
private itemEvenRouter;
protected itemEvenRouter: ItemEventRouter;
constructor(itemEvenRouter: ItemEventRouter);
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

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

View File

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

View File

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

View File

@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType";
import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { RandomUtil } from "../utils/RandomUtil";
export declare class BotWeaponGenerator {
private logger;
private hashUtil;
private databaseServer;
private itemHelper;
private weightedRandomHelper;
private botGeneratorHelper;
private randomUtil;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper;
protected weightedRandomHelper: WeightedRandomHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected randomUtil: RandomUtil;
private readonly modMagazineSlotId;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
generateWeapon(equipmentSlot: string, weaponPool: Record<string, number>, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
/**
* Get the mods necessary to kit out a weapon to its preset level
* @param weaponTpl weapon to find preset for
* @param equipmentSlot the slot the weapon will be placed in
* @param weaponParentId
* @returns array of weapon mods
*/
protected getPresetWeaponMods(weaponTpl: string, equipmentSlot: string, weaponParentId: string, itemTemplate: ITemplateItem, botRole: string): Item[];
/** Checks if all required slots are occupied on a weapon and all it's mods */
private isWeaponValid;
protected isWeaponValid(itemList: Item[]): boolean;
/**
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
* Additionally, adds extra bullets to SecuredContainer
*
* @param {*} weaponMods
* @param {*} weaponTemplate
* @param {*} magCounts
* @param {*} ammoTpl
* @returns
*/
private generateExtraMagazines;
private addBullets;
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
* Additionally, adds extra bullets to SecuredContainer
* @param weaponMods
* @param weaponTemplate
* @param magCounts
* @param ammoTpl
* @param inventory
* @returns
*/
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
/**
* Finds and returns tpl of ammo that should be used, while making sure it's compatible
* Get a randomised count of magazines
* @param magCounts min and max value returned value can be between
* @returns numberical value of magazine count
*/
protected getRandomisedMagazineCount(magCounts: MinMax): number;
/**
* Add ammo to the secure container
* @param stackCount How many stacks of ammo to add
* @param ammoTpl Ammo type to add
* @param stackSize Size of the ammo stack to add
* @param inventory Player inventory
*/
protected addAmmoToSecureContainer(stackCount: number, ammoTpl: string, stackSize: number, inventory: PmcInventory): void;
/**
* Get a weapons magazine tpl from a weapon template
* @param weaponMods mods from a weapon template
* @param weaponTemplate Weapon to get magazine tpl for
* @returns magazine tpl string
*/
protected getMagazineTplFromWeaponTemplate(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
protected addBulletsToVestAndPockets(ammoTpl: string, bulletCount: number, inventory: PmcInventory): void;
/**
* Finds and returns compatible ammo tpl
*
* @param {*} weaponMods
* @param {*} weaponTemplate
* @returns
* @returns compatible ammo tpl
*/
private getCompatibleAmmo;
/** Fill existing magazines to full, while replacing their contents with specified ammo */
private fillExistingMagazines;
protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
/**
* Fill existing magazines to full, while replacing their contents with specified ammo
* @param weaponMods
* @param magazine
* @param ammoTpl
*/
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
/**
* Fill each Camora with a bullet
* @param weaponMods Weapon mods to find and update camora mod(s) from
* @param magazineId magazine id to find and add to
* @param ammoTpl ammo template id to hydate with
*/
protected fillCamorasWithAmmo(weaponMods: Item[], magazineId: string, ammoTpl: string): void;
}

View File

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

View File

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

View File

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

View File

@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
export declare class RagfairOfferGenerator {
private logger;
private jsonUtil;
private hashUtil;
private randomUtil;
private timeUtil;
private databaseServer;
private ragfairServerHelper;
private saveServer;
private presetHelper;
private ragfairAssortGenerator;
private ragfairOfferService;
private ragfairPriceService;
private fenceService;
private itemHelper;
private configServer;
private ragfairConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected ragfairServerHelper: RagfairServerHelper;
protected saveServer: SaveServer;
protected presetHelper: PresetHelper;
protected ragfairAssortGenerator: RagfairAssortGenerator;
protected ragfairOfferService: RagfairOfferService;
protected ragfairPriceService: RagfairPriceService;
protected fenceService: FenceService;
protected itemHelper: ItemHelper;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
private getTraderId;
private getRating;
private getRatingGrowing;
private getOfferEndTime;
protected getTraderId(userID: string): string;
protected getRating(userID: string): number;
protected getRatingGrowing(userID: string): boolean;
protected getOfferEndTime(userID: string, time: number): number;
/**
* Create multiple offers for items by using a unique list of items we've generated previously
* @param expiredOffers
*/
generateDynamicOffers(expiredOffers?: Item[]): void;
generateTraderOffers(traderID: string): void;
private getItemCondition;
private addMissingCondition;
private getOfferRequirements;
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
protected addMissingCondition(item: Item): Item;
protected getOfferRequirements(items: Item[]): {
count: number;
_tpl: string;
}[];
/**
* Create a flea offer and store it in the Ragfair server offers array
*/

View File

@ -1,19 +1,33 @@
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { ConfigServer } from "../servers/ConfigServer";
import { IWeatherData } from "../models/eft/weather/IWeatherData";
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class WeatherGenerator {
private weightedRandomHelper;
private randomUtil;
private timeUtil;
private configServer;
private weatherConfig;
protected weightedRandomHelper: WeightedRandomHelper;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected configServer: ConfigServer;
protected weatherConfig: IWeatherConfig;
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
calculateTime(data: IWeatherData): IWeatherData;
/**
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
* Format to BSGs requirements
* @param computedDate current date
* @returns formatted time
*/
protected getAcceleratedTime(computedDate: Date): string;
/**
* Get current time formatted to fit BSGs requirement
* @param computedDate
* @returns
*/
protected getNormalTime(computedDate: Date): string;
generateWeather(data: IWeatherData): IWeatherData;
private getWeightedFog;
private getWeightedRain;
private getRandomFloat;
private getRandomInt;
protected getWeightedFog(): string;
protected getWeightedRain(): number;
protected getRandomFloat(node: string): number;
protected getRandomInt(node: string): number;
}

View File

@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "./ItemHelper";
import { QuestHelper } from "./QuestHelper";
export declare class AssortHelper {
private logger;
private itemHelper;
private databaseServer;
private questHelper;
protected logger: ILogger;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper;
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile
* @param traderId traders id
* @param assort assort items from a trader
* @returns assort items minus locked quest assorts
*/
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile
* @param traderId traders id
* @param assort traders assorts
* @returns traders assorts minus locked loyality assorts
*/
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
/**
* Remove an item from an assort
* @param assort assort to modify
* @param itemID item id to remove from asort
* @returns Modified assort
*/
removeItemFromAssort(assort: ITraderAssort, itemID: string): ITraderAssort;
stripQuestAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
stripLoyaltyAssort(pmcProfile: IPmcData, sessionId: string, traderId: string, assort: ITraderAssort): ITraderAssort;
}

View File

@ -1,8 +1,9 @@
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
import { Item, Upd } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
import { Grid, ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil";
import { ContainerHelper } from "./ContainerHelper";
import { InventoryHelper } from "./InventoryHelper";
import { ItemHelper } from "./ItemHelper";
import { ProbabilityHelper } from "./ProbabilityHelper";
export declare class BotGeneratorHelper {
private logger;
private jsonUtil;
private hashUtil;
private randomUtil;
private databaseServer;
private durabilityLimitsHelper;
private itemHelper;
private inventoryHelper;
private containerHelper;
private configServer;
private botConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected probabilityHelper: ProbabilityHelper;
protected databaseServer: DatabaseServer;
protected durabilityLimitsHelper: DurabilityLimitsHelper;
protected itemHelper: ItemHelper;
protected inventoryHelper: InventoryHelper;
protected containerHelper: ContainerHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[];
/**
* Get a list of non black-listed cartridges from the PMC bot config
* @param modSlot mod item slot
* @param itemModPool
* @returns string array of cartridges PMCs can use
*/
protected getNonBlacklistedCartridges(modSlot: string, itemModPool: Record<string, string[]>): string[];
/**
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
* never return true for an item that has 0% spawn chance
* @param itemSlot slot the item sits in
* @param modSlot slot the mod sits in
* @param modSpawnChances Chances for various mod spawns
* @returns boolean true if it should spawn
*/
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
/**
* Get a list of containers that hold ammo
* @returns string array
*/
protected getAmmoContainers(): string[];
/**
* Get the slot details for an item (chamber/cartridge/slot)
* @param modSlot e.g patron_in_weapon
* @param parentTemplate item template
* @returns
*/
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
/**
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
@ -37,16 +68,50 @@ export declare class BotGeneratorHelper {
* @param {string} parentId The CylinderMagazine's UID
* @param {object} parentTemplate The CylinderMagazine's template
*/
private fillCamora;
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
"upd"?: Upd;
upd?: Upd;
};
private getModTplFromItemDb;
/**
* Create a repairable object for a weapon that containers durability + max durability properties
* @param itemTemplate weapon object being generated for
* @param botRole type of bot being generated for
* @returns Repairable object
*/
protected generateWeaponRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
/**
* Create a repairable object for an armor that containers durability + max durability properties
* @param itemTemplate weapon object being generated for
* @param botRole type of bot being generated for
* @returns Repairable object
*/
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/**
* Sort by spawn chance, highest to lowest, higher is more common
* @param unsortedModArray String array to sort
* @returns Sorted string array
*/
protected sortModArray(unsortedModArray: string[]): string[];
/**
* Can an item be added to an item without issue
* @param items
* @param tplToCheck
* @param equipmentSlot
* @returns true if possible
*/
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
/** Adds an item with all its childern into specified equipmentSlots, wherever it fits.
* Returns a `boolean` indicating success. */
/**
* Adds an item with all its childern into specified equipmentSlots, wherever it fits.
* @param equipmentSlots
* @param parentId
* @param parentTpl
* @param itemWithChildren
* @param inventory
* @returns a `boolean` indicating item was added
*/
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean;
private itemAllowedInContainer;
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
}
export declare class ExhaustableArray<T> {
private itemPool;

View File

@ -1,16 +1,17 @@
import { Difficulty } from "../models/eft/common/tables/IBotType";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
export declare class BotHelper {
private logger;
private jsonUtil;
private databaseServer;
private randomUtil;
private configServer;
private botConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
protected randomUtil: RandomUtil;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
getPmcDifficultySettings(type: string, difficulty: string): Difficulty;
@ -33,7 +34,7 @@ export declare class BotHelper {
* @param difficultySettings bot settings to alter
* @param typesToAdd bot type to add to enemy list
*/
addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[]): void;
addBotToEnemyList(difficultySettings: Difficulty, typesToAdd: string[], typeBeingEdited: string): void;
/**
* Add a bot to the REVENGE_BOT_TYPES array
* @param difficultySettings bot settings to alter

View File

@ -6,7 +6,7 @@ export declare class FindSlotResult {
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
}
export declare class ContainerHelper {
private locateSlot;
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
}

View File

@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper";
import { NotificationSendHelper } from "./NotificationSendHelper";
import { NotifierHelper } from "./NotifierHelper";
export declare class DialogueHelper {
private hashUtil;
private saveServer;
private databaseServer;
private notifierHelper;
private notificationSendHelper;
private itemHelper;
protected hashUtil: HashUtil;
protected saveServer: SaveServer;
protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper;
protected notificationSendHelper: NotificationSendHelper;
protected itemHelper: ItemHelper;
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;

View File

@ -1,25 +1,26 @@
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { RandomUtil } from "../utils/RandomUtil";
import { BotHelper } from "./BotHelper";
export declare class DurabilityLimitsHelper {
private randomUtil;
private botHelper;
private configServer;
private botConfig;
protected randomUtil: RandomUtil;
protected botHelper: BotHelper;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
private generateMaxWeaponDurability;
private generateMaxPmcArmorDurability;
private getLowestMaxWeaponFromConfig;
private getHighestMaxWeaponDurabilityFromConfig;
private generateWeaponDurability;
private generateArmorDurability;
private getMinWeaponDeltaFromConfig;
private getMaxWeaponDeltaFromConfig;
private getMinArmorDeltaFromConfig;
private getMaxArmorDeltaFromConfig;
protected generateMaxWeaponDurability(botRole: string): number;
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
protected getLowestMaxWeaponFromConfig(botRole: string): number;
protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number;
protected generateWeaponDurability(botRole: string, maxDurability: number): number;
protected generateArmorDurability(botRole: string, maxDurability: number): number;
protected getMinWeaponDeltaFromConfig(botRole: string): number;
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
protected getMinArmorDeltaFromConfig(botRole: string): number;
protected getMaxArmorDeltaFromConfig(botRole: string): number;
}

View File

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

View File

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

View File

@ -0,0 +1,11 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class GameHelper {
protected logger: ILogger;
constructor(logger: ILogger);
/**
* Remove condition conters no longer used
* @param pmcProfile profile to remove old counters from
*/
removeDanglingConditionCounters(pmcProfile: IPmcData): void;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,15 +1,15 @@
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem, StackSlot } from "../models/eft/common/tables/ITemplateItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
declare class ItemHelper {
private logger;
private hashUtil;
private jsonUtil;
private databaseServer;
protected logger: ILogger;
protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer);
/**
* Checks if a id is a valid item. Valid meaning that it's an item that be stored in stash
@ -82,7 +82,7 @@ declare class ItemHelper {
* @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of
* @returns {array} The array of StackSlotItems
*/
generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[];
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
getItem(tpl: string): [boolean, ITemplateItem];
getItemQualityModifier(item: Item): number;
findAndReturnChildrenByItems(items: Item[], itemID: string): string[];

View File

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

View File

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

View File

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

View File

@ -0,0 +1,14 @@
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
export declare class ProbabilityHelper {
protected logger: ILogger;
protected randomUtil: RandomUtil;
constructor(logger: ILogger, randomUtil: RandomUtil);
/**
* Chance to roll a number out of 100
* @param chance Percentage chance roll should success
* @param scale scale of chance to allow support of numbers > 1-100
* @returns true if success
*/
rollChance(chance: number, scale?: number): boolean;
}

View File

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

View File

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

View File

@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ConfigServer } from "../servers/ConfigServer";
@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper";
import { RagfairServerHelper } from "./RagfairServerHelper";
import { TraderHelper } from "./TraderHelper";
export declare class QuestHelper {
private logger;
private jsonUtil;
private timeUtil;
private hashUtil;
private itemHelper;
private itemEventRouter;
private databaseServer;
private ragfairServerHelper;
private dialogueHelper;
private profileHelper;
private paymentHelper;
private traderHelper;
private configServer;
private questConfig;
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer;
protected ragfairServerHelper: RagfairServerHelper;
protected dialogueHelper: DialogueHelper;
protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper;
protected traderHelper: TraderHelper;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
static get STATUS(): Record<string, number>;
questStatus(pmcData: IPmcData, questID: string): string;
@ -47,7 +48,7 @@ export declare class QuestHelper {
*/
dumpQuests(quests: any, label?: any): void;
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
private processReward;
protected processReward(reward: Reward): any[];
getQuestRewardItems(quest: IQuest, state: string): Reward[];
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
@ -56,13 +57,30 @@ export declare class QuestHelper {
changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void;
/**
* Get List of All Quests as an array
* @returns Array of IQuest objects
*/
questValues(): IQuest[];
private cleanQuestList;
/**
* Reest AvailableForStart conditions for quests
* @param quests queststo clean
* @returns quest array without conditions
*/
protected cleanQuestList(quests: IQuest[]): IQuest[];
/**
* Reset AvailableForStart conditions on a quest
* @param quest quest to clean
* @returns reset IQuest object
*/
cleanQuestConditions(quest: IQuest): IQuest;
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
getQuestLocaleIdFromDb(messageId: string, localisation?: string): string;
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): any[];
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: string, sessionID: string): Reward[];
/**
* Get the intel center bonus a player has
* @param pmcData player profile
* @returns bonus in percent
*/
protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
getFindItemIdForQuestItem(itemTpl: string): string;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Upd } from "../models/eft/common/tables/IItem";
import { Item, Upd } from "../models/eft/common/tables/IItem";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData";
@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer";
import { FenceService } from "../services/FenceService";
import { PaymentService } from "../services/PaymentService";
export declare class TradeHelper {
private logger;
private itemEventRouter;
private traderHelper;
private itemHelper;
private paymentService;
private fenceService;
private inventoryHelper;
private ragfairServer;
protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected traderHelper: TraderHelper;
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected fenceService: FenceService;
protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer);
/**
* Buy item from flea or trader
@ -39,6 +39,6 @@ export declare class TradeHelper {
* @returns
*/
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
private incrementAssortBuyCount;
private checkPurchaseIsWithinTraderItemLimit;
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
}

View File

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

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