update types
This commit is contained in:
parent
2f5fce4322
commit
6d6665cd82
@ -5,8 +5,8 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class BotCallbacks {
|
export declare class BotCallbacks {
|
||||||
private botController;
|
protected botController: BotController;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { BundleLoader } from "../loaders/BundleLoader";
|
import { BundleLoader } from "../loaders/BundleLoader";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class BundleCallbacks {
|
export declare class BundleCallbacks {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private httpServer;
|
protected httpServer: IHttpServer;
|
||||||
private bundleLoader;
|
protected bundleLoader: BundleLoader;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private httpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
@ -9,9 +9,9 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class CustomizationCallbacks {
|
export declare class CustomizationCallbacks {
|
||||||
private customizationController;
|
protected customizationController: CustomizationController;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
||||||
_id: string;
|
_id: string;
|
||||||
|
@ -12,8 +12,8 @@ import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||||
|
@ -21,10 +21,10 @@ import { HashUtil } from "../utils/HashUtil";
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueCallbacks extends OnUpdate {
|
export declare class DialogueCallbacks extends OnUpdate {
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private dialogueController;
|
protected dialogueController: DialogueController;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
@ -8,9 +8,9 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { Watermark } from "../utils/Watermark";
|
||||||
declare class GameCallbacks {
|
declare class GameCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private watermark;
|
protected watermark: Watermark;
|
||||||
private gameController;
|
protected gameController: GameController;
|
||||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
||||||
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
||||||
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { HandbookController } from "../controllers/HandbookController";
|
import { HandbookController } from "../controllers/HandbookController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class HandbookCallbacks extends OnLoad {
|
export declare class HandbookCallbacks extends OnLoad {
|
||||||
private handbookController;
|
protected handbookController: HandbookController;
|
||||||
constructor(handbookController: HandbookController);
|
constructor(handbookController: HandbookController);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -9,9 +9,9 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class HealthCallbacks {
|
export declare class HealthCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private healthController;
|
protected healthController: HealthController;
|
||||||
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
|
||||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -11,11 +11,12 @@ import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutTog
|
|||||||
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class HideoutCallbacks extends OnUpdate {
|
export declare class HideoutCallbacks extends OnUpdate {
|
||||||
private hideoutController;
|
protected hideoutController: HideoutController;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private hideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||||
configServer: ConfigServer);
|
configServer: ConfigServer);
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
export declare class HttpCallbacks extends OnLoad {
|
export declare class HttpCallbacks extends OnLoad {
|
||||||
private httpServer;
|
protected httpServer: IHttpServer;
|
||||||
constructor(httpServer: IHttpServer);
|
constructor(httpServer: IHttpServer);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -3,14 +3,16 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class InraidCallbacks {
|
export declare class InraidCallbacks {
|
||||||
private inraidController;
|
protected inraidController: InraidController;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private airdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
private inraidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
||||||
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
||||||
|
@ -5,15 +5,16 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
|
|||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||||
private insuranceController;
|
protected insuranceController: InsuranceController;
|
||||||
private insuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private insuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
@ -18,7 +18,7 @@ import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryT
|
|||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
private inventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -4,8 +4,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class ItemEventCallbacks {
|
export declare class ItemEventCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
}
|
}
|
||||||
|
@ -8,10 +8,10 @@ import { SaveServer } from "../servers/SaveServer";
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { Watermark } from "../utils/Watermark";
|
||||||
declare class LauncherCallbacks {
|
declare class LauncherCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private launcherController;
|
protected launcherController: LauncherController;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private watermark;
|
protected watermark: Watermark;
|
||||||
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark);
|
constructor(httpResponse: HttpResponseUtil, launcherController: LauncherController, saveServer: SaveServer, watermark: Watermark);
|
||||||
connect(): string;
|
connect(): string;
|
||||||
login(url: string, info: ILoginRequestData, sessionID: string): string;
|
login(url: string, info: ILoginRequestData, sessionID: string): string;
|
||||||
|
@ -6,8 +6,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
|
|||||||
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class LocationCallbacks {
|
export declare class LocationCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private locationController;
|
protected locationController: LocationController;
|
||||||
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||||
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||||
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||||
|
@ -9,10 +9,10 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class MatchCallbacks {
|
export declare class MatchCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private matchController;
|
protected matchController: MatchController;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks extends OnLoad {
|
declare class ModCallbacks extends OnLoad {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private httpServer;
|
protected httpServer: IHttpServer;
|
||||||
private modLoader;
|
protected modLoader: DelayedModLoader;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private httpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
export declare class NoteCallbacks {
|
export declare class NoteCallbacks {
|
||||||
private noteController;
|
protected noteController: NoteController;
|
||||||
constructor(noteController: NoteController);
|
constructor(noteController: NoteController);
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -6,9 +6,9 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
|||||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class NotifierCallbacks {
|
export declare class NotifierCallbacks {
|
||||||
private httpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private notifierController;
|
protected notifierController: NotifierController;
|
||||||
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, 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
|
* 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
|
* until we actually have something to send because otherwise we'd spam the client
|
||||||
* and the client would abort the connection due to spam.
|
* 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[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
@ -6,8 +6,8 @@ import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPreset
|
|||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class PresetBuildCallbacks {
|
export declare class PresetBuildCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private presetBuildController;
|
protected presetBuildController: PresetBuildController;
|
||||||
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
||||||
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { PresetController } from "../controllers/PresetController";
|
import { PresetController } from "../controllers/PresetController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class PresetCallbacks extends OnLoad {
|
export declare class PresetCallbacks extends OnLoad {
|
||||||
private presetController;
|
protected presetController: PresetController;
|
||||||
constructor(presetController: PresetController);
|
constructor(presetController: PresetController);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -12,9 +12,9 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class ProfileCallbacks {
|
export declare class ProfileCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private profileController;
|
protected profileController: ProfileController;
|
||||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
||||||
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
|
@ -13,9 +13,9 @@ import { IListQuestsRequestData } from "../models/eft/quests/IListQuestsRequestD
|
|||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class QuestCallbacks {
|
export declare class QuestCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private questController;
|
protected questController: QuestController;
|
||||||
private repeatableQuestController;
|
protected repeatableQuestController: RepeatableQuestController;
|
||||||
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
constructor(httpResponse: HttpResponseUtil, questController: QuestController, repeatableQuestController: RepeatableQuestController);
|
||||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -11,19 +11,20 @@ import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
|||||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||||
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private ragfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
private ragfairController;
|
protected ragfairController: RagfairController;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
export declare class RepairCallbacks {
|
export declare class RepairCallbacks {
|
||||||
private repairController;
|
protected repairController: RepairController;
|
||||||
constructor(repairController: RepairController);
|
constructor(repairController: RepairController);
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(saveServer: SaveServer);
|
constructor(saveServer: SaveServer);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -4,7 +4,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
export declare class TradeCallbacks {
|
export declare class TradeCallbacks {
|
||||||
private tradeController;
|
protected tradeController: TradeController;
|
||||||
constructor(tradeController: TradeController);
|
constructor(tradeController: TradeController);
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -5,8 +5,8 @@ import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private traderController;
|
protected traderController: TraderController;
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
onLoad(): void;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -3,8 +3,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class WeatherCallbacks {
|
export declare class WeatherCallbacks {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private weatherController;
|
protected weatherController: WeatherController;
|
||||||
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
||||||
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
export declare class WishlistCallbacks {
|
export declare class WishlistCallbacks {
|
||||||
private wishlistController;
|
protected wishlistController: WishlistController;
|
||||||
constructor(wishlistController: WishlistController);
|
constructor(wishlistController: WishlistController);
|
||||||
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -4,14 +4,15 @@ import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequest
|
|||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class BotController {
|
export declare class BotController {
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private botGenerator;
|
protected botGenerator: BotGenerator;
|
||||||
private botHelper;
|
protected botHelper: BotHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Return the number of bot loadout varieties to be generated
|
* Return the number of bot loadout varieties to be generated
|
||||||
@ -19,6 +20,7 @@ export declare class BotController {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
|
getBotCoreDifficulty(): IBotCore;
|
||||||
/**
|
/**
|
||||||
* Get bot difficulty settings
|
* Get bot difficulty settings
|
||||||
* adjust PMC settings to ensure they engage the correct bot types
|
* 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
|
* @param difficulty difficulty level server requested settings for
|
||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty;
|
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||||
private getPmcDifficultySettings;
|
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
|
||||||
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
getBotCap(): number;
|
getBotCap(): number;
|
||||||
}
|
}
|
||||||
|
@ -9,14 +9,14 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
export declare class CustomizationController {
|
export declare class CustomizationController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
private getAllTraderSuits;
|
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@ import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachme
|
|||||||
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
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 { SaveServer } from "../servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class DialogueController {
|
export declare class DialogueController {
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
||||||
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
||||||
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
@ -19,7 +19,7 @@ export declare class DialogueController {
|
|||||||
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
||||||
setRead(dialogueIDs: string[], sessionID: string): void;
|
setRead(dialogueIDs: string[], sessionID: string): void;
|
||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
||||||
private messagesHaveUncollectedRewards;
|
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
||||||
private removeExpiredItems;
|
protected removeExpiredItems(sessionID: string): void;
|
||||||
update(): void;
|
update(): void;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
|
import { GameHelper } from "../helpers/GameHelper";
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
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 { 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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { Watermark } from "../utils/Watermark";
|
||||||
export declare class GameController {
|
export declare class GameController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private watermark;
|
protected watermark: Watermark;
|
||||||
private httpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private configServer;
|
protected gameHelper: GameHelper;
|
||||||
private httpConfig;
|
protected configServer: ConfigServer;
|
||||||
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, 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;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
||||||
private addMissingBonusesProperty;
|
protected addMissingBonusesProperty(pmcProfile: IPmcData): void;
|
||||||
private addMissingRepeatableQuestsProperty;
|
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
|
||||||
private addMissingWeaponRepairSkill;
|
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void;
|
||||||
private addMissingAkiVersionTagToProfile;
|
protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void;
|
||||||
private addMissingArmorRepairSkill;
|
protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void;
|
||||||
private fixNullTraderSalesSums;
|
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
|
||||||
private removeDanglingConditionCounters;
|
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
|
||||||
private removeDanglingBackendCounters;
|
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
getServer(): any[];
|
getServer(): any[];
|
||||||
private getActiveRepeatableQuests;
|
protected getActiveRepeatableQuests(repeatableQuests: IPmcDataRepeatableQuest[]): IRepeatableQuest[];
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class HandbookController {
|
export declare class HandbookController {
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private handbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
|
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);
|
||||||
load(): void;
|
load(): void;
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,12 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
export declare class HealthController {
|
export declare class HealthController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private paymentService;
|
protected paymentService: PaymentService;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private healthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -3,10 +3,12 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
|
|||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
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 { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
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 { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -25,32 +28,41 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class HideoutController {
|
export declare class HideoutController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private playerService;
|
protected playerService: PlayerService;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private hideoutHelper;
|
protected hideoutHelper: HideoutHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private hideoutConfig;
|
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);
|
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;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, 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;
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, 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;
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, 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;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
update(): void;
|
update(): void;
|
||||||
}
|
}
|
||||||
|
@ -6,24 +6,25 @@ import { QuestHelper } from "../helpers/QuestHelper";
|
|||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class InraidController {
|
export declare class InraidController {
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private questHelper;
|
protected questHelper: QuestHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private extendedProfileHelper;
|
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||||
private healthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private insuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
private inRaidHelper;
|
protected inRaidHelper: InRaidHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private inraidConfig;
|
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);
|
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;
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
|
@ -5,6 +5,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -15,19 +16,19 @@ import { PaymentService } from "../services/PaymentService";
|
|||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class InsuranceController {
|
export declare class InsuranceController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private paymentService;
|
protected paymentService: PaymentService;
|
||||||
private insuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private insuranceConfig;
|
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
|
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);
|
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||||
processReturn(): void;
|
processReturn(): void;
|
||||||
|
@ -27,15 +27,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class InventoryController {
|
export declare class InventoryController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
|
@ -3,23 +3,24 @@ import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
|||||||
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
import { Info } from "../models/eft/profile/IAkiProfile";
|
import { Info } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
export declare class LauncherController {
|
export declare class LauncherController {
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private httpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private coreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
connect(): any;
|
connect(): any;
|
||||||
find(sessionIdKey: string): Info;
|
find(sessionIdKey: string): Info;
|
||||||
login(info: ILoginRequestData): string;
|
login(info: ILoginRequestData): string;
|
||||||
register(info: IRegisterData): string;
|
register(info: IRegisterData): string;
|
||||||
private createAccount;
|
protected createAccount(info: IRegisterData): string;
|
||||||
changeUsername(info: IChangeRequestData): string;
|
changeUsername(info: IChangeRequestData): string;
|
||||||
changePassword(info: IChangeRequestData): string;
|
changePassword(info: IChangeRequestData): string;
|
||||||
wipe(info: IRegisterData): string;
|
wipe(info: IRegisterData): string;
|
||||||
|
@ -6,11 +6,11 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class LocationController {
|
export declare class LocationController {
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private locationGenerator;
|
protected locationGenerator: LocationGenerator;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
||||||
get(location: string): ILocationBase;
|
get(location: string): ILocationBase;
|
||||||
generate(name: string): ILocationBase;
|
generate(name: string): ILocationBase;
|
||||||
|
@ -4,21 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { MatchLocationService } from "../services/MatchLocationService";
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
export declare class MatchController {
|
export declare class MatchController {
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private matchLocationService;
|
protected matchLocationService: MatchLocationService;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private matchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
private inraidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
private getMatch;
|
protected getMatch(location: any): any;
|
||||||
createGroup(sessionID: string, info: any): any;
|
createGroup(sessionID: string, info: any): any;
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
joinMatch(info: any, sessionID: string): any[];
|
joinMatch(info: any, sessionID: string): any[];
|
||||||
|
@ -3,7 +3,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
declare class NoteController {
|
declare class NoteController {
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(itemEventRouter: ItemEventRouter);
|
constructor(itemEventRouter: ItemEventRouter);
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -3,11 +3,11 @@ import { NotificationService } from "../services/NotificationService";
|
|||||||
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
export declare class NotifierController {
|
export declare class NotifierController {
|
||||||
private notifierHelper;
|
protected notifierHelper: NotifierHelper;
|
||||||
private httpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
private notificationService;
|
protected notificationService: NotificationService;
|
||||||
private pollInterval;
|
protected pollInterval: number;
|
||||||
private timeout;
|
protected timeout: number;
|
||||||
constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService);
|
constructor(notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, notificationService: NotificationService);
|
||||||
/**
|
/**
|
||||||
* Resolve an array of session notifications.
|
* Resolve an array of session notifications.
|
||||||
|
@ -7,10 +7,10 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
export declare class PresetBuildController {
|
export declare class PresetBuildController {
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
|
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
getUserBuilds(sessionID: string): WeaponBuild[];
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class PresetController {
|
export declare class PresetController {
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||||
initialize(): void;
|
initialize(): void;
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,13 @@ import { SaveServer } from "../servers/SaveServer";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private extendedProfileHelper;
|
protected extendedProfileHelper: ExtendedProfileHelper;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, traderHelper: TraderHelper, extendedProfileHelper: ExtendedProfileHelper);
|
||||||
getMiniProfiles(): IMiniProfile[];
|
getMiniProfiles(): IMiniProfile[];
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): any;
|
||||||
|
@ -4,11 +4,12 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
|||||||
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
|
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -16,22 +17,58 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class QuestController {
|
export declare class QuestController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private questHelper;
|
protected questHelper: QuestHelper;
|
||||||
private questConditionHelper;
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
private playerService;
|
protected playerService: PlayerService;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private questConfig;
|
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);
|
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[];
|
getClientQuests(sessionID: string): IQuest[];
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
acceptRepeatableQuest(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;
|
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;
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -33,30 +34,30 @@ import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsSer
|
|||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class RagfairController {
|
export declare class RagfairController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private ragfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
private ragfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private ragfairSellHelper;
|
protected ragfairSellHelper: RagfairSellHelper;
|
||||||
private ragfairTaxHelper;
|
protected ragfairTaxHelper: RagfairTaxHelper;
|
||||||
private ragfairSortHelper;
|
protected ragfairSortHelper: RagfairSortHelper;
|
||||||
private ragfairOfferHelper;
|
protected ragfairOfferHelper: RagfairOfferHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private paymentService;
|
protected paymentService: PaymentService;
|
||||||
private handbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private ragfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
private ragfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
private ragfairRequiredItemsService;
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
private ragfairOfferGenerator;
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
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);
|
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;
|
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||||
update(): void;
|
update(): void;
|
||||||
|
@ -5,21 +5,23 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
|
||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
export declare class RepairController {
|
export declare class RepairController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private questHelper;
|
protected questHelper: QuestHelper;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private paymentService;
|
protected paymentService: PaymentService;
|
||||||
private repairHelper;
|
protected repairHelper: RepairHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private repairConfig;
|
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);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Repair with trader
|
* Repair with trader
|
||||||
@ -36,5 +38,5 @@ export declare class RepairController {
|
|||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @returns item event router action
|
* @returns item event router action
|
||||||
*/
|
*/
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { GameHelper } from "../helpers/GameHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
@ -9,7 +10,7 @@ import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationConditi
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
import { ELocationName } from "../models/enums/ELocationName";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -48,22 +49,23 @@ export interface ITargetLocation {
|
|||||||
locations: string[];
|
locations: string[];
|
||||||
}
|
}
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private mathUtil;
|
protected mathUtil: MathUtil;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private ragfairServerHelper;
|
protected gameHelper: GameHelper;
|
||||||
private itemEventRouter;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
private paymentService;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private objectId;
|
protected paymentService: PaymentService;
|
||||||
private configServer;
|
protected objectId: ObjectId;
|
||||||
private questConfig;
|
protected configServer: ConfigServer;
|
||||||
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 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
|
* 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.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
|
@ -9,11 +9,11 @@ import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTr
|
|||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
declare class TradeController {
|
declare class TradeController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private tradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private ragfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, 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;
|
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -8,14 +8,14 @@ import { TraderAssortService } from "../services/TraderAssortService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class TraderController {
|
export declare class TraderController {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private traderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private traderAssortService;
|
protected traderAssortService: TraderAssortService;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil);
|
||||||
load(): void;
|
load(): void;
|
||||||
getTrader(traderID: string, sessionID: string): ITraderBase;
|
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class WeatherController {
|
export declare class WeatherController {
|
||||||
private weatherGenerator;
|
protected weatherGenerator: WeatherGenerator;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private weatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||||
generate(): IWeatherData;
|
generate(): IWeatherData;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class WishlistController {
|
export declare class WishlistController {
|
||||||
private itemEvenRouter;
|
protected itemEvenRouter: ItemEventRouter;
|
||||||
constructor(itemEvenRouter: ItemEventRouter);
|
constructor(itemEvenRouter: ItemEventRouter);
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
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 { 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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -9,28 +12,35 @@ import { HashUtil } from "../utils/HashUtil";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
|
declare namespace BotGenerator {
|
||||||
|
interface IRandomisedBotLevelResult {
|
||||||
|
level: number;
|
||||||
|
exp: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
export declare class BotGenerator {
|
export declare class BotGenerator {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private botInventoryGenerator;
|
protected botInventoryGenerator: BotInventoryGenerator;
|
||||||
private botHelper;
|
protected botHelper: BotHelper;
|
||||||
private gameEventHelper;
|
protected gameEventHelper: GameEventHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
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[];
|
generate(info: IGenerateBotsRequestData, playerScav?: boolean): IBotBase[];
|
||||||
private generateBot;
|
protected generateBot(bot: IBotBase, role: string, isPmc: boolean): IBotBase;
|
||||||
private generateRandomLevel;
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
/** Converts health object to the required format */
|
/** Converts health object to the required format */
|
||||||
private generateHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
private generateSkills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
private getPmcRole;
|
protected getPmcRole(pmcSide: string): string;
|
||||||
private removeChristmasItemsFromBotInventory;
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
private generateId;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
private generateInventoryID;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
private getPMCDifficulty;
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
private generateDogtag;
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
}
|
}
|
||||||
|
export {};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
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 { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
@ -9,16 +9,16 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
export declare class BotInventoryGenerator {
|
export declare class BotInventoryGenerator {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private botWeaponGenerator;
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
private botLootGenerator;
|
protected botLootGenerator: BotLootGenerator;
|
||||||
private botGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
private weightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, 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;
|
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||||
private generateEquipment;
|
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
||||||
private generateInventoryBase;
|
protected generateInventoryBase(): PmcInventory;
|
||||||
}
|
}
|
||||||
|
@ -3,25 +3,27 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
import { ItemMinMax, Items } from "../models/eft/common/tables/IBotType";
|
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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class BotLootGenerator {
|
export declare class BotLootGenerator {
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private handbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
private botGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
private pmcLootGenerator;
|
protected pmcLootGenerator: PMCLootGenerator;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, pmcLootGenerator: PMCLootGenerator, configServer: ConfigServer);
|
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;
|
generateLoot(lootPool: Items, itemCounts: ItemMinMax, isPmc: boolean, inventory: PmcInventory): void;
|
||||||
private getRandomisedCount;
|
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||||
private addLootFromPool;
|
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 */
|
/** Compares two item templates by their price to spawn chance ratio */
|
||||||
private compareByValue;
|
protected compareByValue(a: ITemplateItem, b: ITemplateItem): number;
|
||||||
}
|
}
|
||||||
|
@ -2,43 +2,87 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private weightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
private botGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
private readonly modMagazineSlotId;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
generateWeapon(equipmentSlot: string, weaponPool: Record<string, number>, modPool: Mods, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void;
|
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 */
|
/** 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.
|
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||||
* Additionally, adds extra bullets to SecuredContainer
|
* Additionally, adds extra bullets to SecuredContainer
|
||||||
*
|
* @param weaponMods
|
||||||
* @param {*} weaponMods
|
* @param weaponTemplate
|
||||||
* @param {*} weaponTemplate
|
* @param magCounts
|
||||||
* @param {*} magCounts
|
* @param ammoTpl
|
||||||
* @param {*} ammoTpl
|
* @param inventory
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
private generateExtraMagazines;
|
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
|
||||||
private addBullets;
|
|
||||||
/**
|
/**
|
||||||
* 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 {*} weaponMods
|
||||||
* @param {*} weaponTemplate
|
* @param {*} weaponTemplate
|
||||||
* @returns
|
* @returns compatible ammo tpl
|
||||||
*/
|
*/
|
||||||
private getCompatibleAmmo;
|
protected getCompatibleAmmo(weaponMods: Item[], weaponTemplate: ITemplateItem): string;
|
||||||
/** Fill existing magazines to full, while replacing their contents with specified ammo */
|
/**
|
||||||
private fillExistingMagazines;
|
* 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;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@ import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
|||||||
import { ILooseLoot, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -18,27 +20,27 @@ export interface IContainerItem {
|
|||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
export declare class LocationGenerator {
|
export declare class LocationGenerator {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private objectId;
|
protected objectId: ObjectId;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private ragfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private mathUtil;
|
protected mathUtil: MathUtil;
|
||||||
private gameEventHelper;
|
protected gameEventHelper: GameEventHelper;
|
||||||
private containerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private locationConfig;
|
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);
|
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;
|
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
private getLooseLootMultiplerForLocation;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
private getStaticLootMultiplerForLocation;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
|
generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): SpawnpointTemplate[];
|
||||||
private createItem;
|
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||||
private getRandomCompatibleCaliberTemplateId;
|
protected getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
|
||||||
private getRandomValidCaliber;
|
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
||||||
private drawAmmoTpl;
|
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
||||||
private createRandomMagCartridges;
|
protected createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
|
||||||
private createCartidges;
|
protected createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
export declare class PMCLootGenerator {
|
export declare class PMCLootGenerator {
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private pocketLootPool;
|
protected pocketLootPool: string[];
|
||||||
private backpackLootPool;
|
protected backpackLootPool: string[];
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
generatePMCPocketLootPool(): string[];
|
generatePMCPocketLootPool(): string[];
|
||||||
generatePMCBackpackLootPool(): string[];
|
generatePMCBackpackLootPool(): string[];
|
||||||
|
@ -4,22 +4,22 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class RagfairAssortGenerator {
|
export declare class RagfairAssortGenerator {
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private generatedAssortItems;
|
protected generatedAssortItems: Item[];
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer);
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Get an array of unique items that can be sold on the flea
|
* Get an array of unique items that can be sold on the flea
|
||||||
* @returns array of unique items
|
* @returns array of unique items
|
||||||
*/
|
*/
|
||||||
getAssortItems(): Item[];
|
getAssortItems(): Item[];
|
||||||
private assortsAreGenerated;
|
protected assortsAreGenerated(): boolean;
|
||||||
/**
|
/**
|
||||||
* Generate an array of items the flea can sell
|
* Generate an array of items the flea can sell
|
||||||
* @returns array of unique items
|
* @returns array of unique items
|
||||||
*/
|
*/
|
||||||
private generateRagfairAssortItems;
|
protected generateRagfairAssortItems(): Item[];
|
||||||
private createRagfairAssortItem;
|
protected createRagfairAssortItem(tplId: string, id?: string): Item;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,10 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
|||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -17,37 +19,40 @@ import { RandomUtil } from "../utils/RandomUtil";
|
|||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
||||||
export declare class RagfairOfferGenerator {
|
export declare class RagfairOfferGenerator {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private ragfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private ragfairAssortGenerator;
|
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||||
private ragfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
private ragfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
private fenceService;
|
protected fenceService: FenceService;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
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);
|
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;
|
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
private getTraderId;
|
protected getTraderId(userID: string): string;
|
||||||
private getRating;
|
protected getRating(userID: string): number;
|
||||||
private getRatingGrowing;
|
protected getRatingGrowing(userID: string): boolean;
|
||||||
private getOfferEndTime;
|
protected getOfferEndTime(userID: string, time: number): number;
|
||||||
/**
|
/**
|
||||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||||
* @param expiredOffers
|
* @param expiredOffers
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): void;
|
generateDynamicOffers(expiredOffers?: Item[]): void;
|
||||||
generateTraderOffers(traderID: string): void;
|
generateTraderOffers(traderID: string): void;
|
||||||
private getItemCondition;
|
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
|
||||||
private addMissingCondition;
|
protected addMissingCondition(item: Item): Item;
|
||||||
private getOfferRequirements;
|
protected getOfferRequirements(items: Item[]): {
|
||||||
|
count: number;
|
||||||
|
_tpl: string;
|
||||||
|
}[];
|
||||||
/**
|
/**
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
*/
|
*/
|
||||||
|
@ -1,19 +1,33 @@
|
|||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class WeatherGenerator {
|
export declare class WeatherGenerator {
|
||||||
private weightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private weatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
calculateTime(data: IWeatherData): IWeatherData;
|
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;
|
generateWeather(data: IWeatherData): IWeatherData;
|
||||||
private getWeightedFog;
|
protected getWeightedFog(): string;
|
||||||
private getWeightedRain;
|
protected getWeightedRain(): number;
|
||||||
private getRandomFloat;
|
protected getRandomFloat(node: string): number;
|
||||||
private getRandomInt;
|
protected getRandomInt(node: string): number;
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,32 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { QuestHelper } from "./QuestHelper";
|
import { QuestHelper } from "./QuestHelper";
|
||||||
export declare class AssortHelper {
|
export declare class AssortHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private questHelper;
|
protected questHelper: QuestHelper;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, 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;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
import { Inventory as PmcInventory } from "../models/eft/common/IPmcData";
|
||||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item, Upd } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -12,20 +13,50 @@ import { RandomUtil } from "../utils/RandomUtil";
|
|||||||
import { ContainerHelper } from "./ContainerHelper";
|
import { ContainerHelper } from "./ContainerHelper";
|
||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { ProbabilityHelper } from "./ProbabilityHelper";
|
||||||
export declare class BotGeneratorHelper {
|
export declare class BotGeneratorHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private databaseServer;
|
protected probabilityHelper: ProbabilityHelper;
|
||||||
private durabilityLimitsHelper;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemHelper;
|
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||||
private inventoryHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private containerHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private configServer;
|
protected containerHelper: ContainerHelper;
|
||||||
private botConfig;
|
protected configServer: ConfigServer;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, 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[];
|
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.
|
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||||
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
* 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 {string} parentId The CylinderMagazine's UID
|
||||||
* @param {object} parentTemplate The CylinderMagazine's template
|
* @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): {
|
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;
|
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;
|
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> {
|
export declare class ExhaustableArray<T> {
|
||||||
private itemPool;
|
private itemPool;
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class BotHelper {
|
export declare class BotHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
getBotDifficultySettings(type: string, difficulty: string): Difficulty;
|
||||||
getPmcDifficultySettings(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 difficultySettings bot settings to alter
|
||||||
* @param typesToAdd bot type to add to enemy list
|
* @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
|
* Add a bot to the REVENGE_BOT_TYPES array
|
||||||
* @param difficultySettings bot settings to alter
|
* @param difficultySettings bot settings to alter
|
||||||
|
@ -6,7 +6,7 @@ export declare class FindSlotResult {
|
|||||||
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
|
||||||
}
|
}
|
||||||
export declare class ContainerHelper {
|
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;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,12 @@ import { ItemHelper } from "./ItemHelper";
|
|||||||
import { NotificationSendHelper } from "./NotificationSendHelper";
|
import { NotificationSendHelper } from "./NotificationSendHelper";
|
||||||
import { NotifierHelper } from "./NotifierHelper";
|
import { NotifierHelper } from "./NotifierHelper";
|
||||||
export declare class DialogueHelper {
|
export declare class DialogueHelper {
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private notifierHelper;
|
protected notifierHelper: NotifierHelper;
|
||||||
private notificationSendHelper;
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void;
|
||||||
|
@ -1,25 +1,26 @@
|
|||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotHelper } from "./BotHelper";
|
import { BotHelper } from "./BotHelper";
|
||||||
export declare class DurabilityLimitsHelper {
|
export declare class DurabilityLimitsHelper {
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private botHelper;
|
protected botHelper: BotHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private botConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||||
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||||
private generateMaxWeaponDurability;
|
protected generateMaxWeaponDurability(botRole: string): number;
|
||||||
private generateMaxPmcArmorDurability;
|
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
||||||
private getLowestMaxWeaponFromConfig;
|
protected getLowestMaxWeaponFromConfig(botRole: string): number;
|
||||||
private getHighestMaxWeaponDurabilityFromConfig;
|
protected getHighestMaxWeaponDurabilityFromConfig(botRole: string): number;
|
||||||
private generateWeaponDurability;
|
protected generateWeaponDurability(botRole: string, maxDurability: number): number;
|
||||||
private generateArmorDurability;
|
protected generateArmorDurability(botRole: string, maxDurability: number): number;
|
||||||
private getMinWeaponDeltaFromConfig;
|
protected getMinWeaponDeltaFromConfig(botRole: string): number;
|
||||||
private getMaxWeaponDeltaFromConfig;
|
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
|
||||||
private getMinArmorDeltaFromConfig;
|
protected getMinArmorDeltaFromConfig(botRole: string): number;
|
||||||
private getMaxArmorDeltaFromConfig;
|
protected getMaxArmorDeltaFromConfig(botRole: string): number;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { BotGenerator } from "../generators/BotGenerator";
|
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 { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
@ -9,14 +9,14 @@ import { Watermark } from "../utils/Watermark";
|
|||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class ExtendedProfileHelper extends 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);
|
constructor(jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator);
|
||||||
generatePlayerScav(sessionID: string): IPmcData;
|
generatePlayerScav(sessionID: string): IPmcData;
|
||||||
private getScavSkills;
|
protected getScavSkills(sessionID: string): Skills;
|
||||||
private removeSecureContainer;
|
protected removeSecureContainer(profile: IPmcData): IPmcData;
|
||||||
private getDefaultScavSkills;
|
protected getDefaultScavSkills(): Skills;
|
||||||
private getScavStats;
|
protected getScavStats(sessionID: string): Stats;
|
||||||
private getScavLevel;
|
protected getScavLevel(sessionID: string): number;
|
||||||
private getScavExperience;
|
protected getScavExperience(sessionID: string): number;
|
||||||
private setScavCooldownTimer;
|
protected setScavCooldownTimer(profile: IPmcData, pmcData: IPmcData): IPmcData;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class GameEventHelper {
|
export declare class GameEventHelper {
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
get EVENT(): Record<string, string>;
|
get EVENT(): Record<string, string>;
|
||||||
get christmasEventItems(): string[];
|
get christmasEventItems(): string[];
|
||||||
|
11
TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts
vendored
Normal file
11
TypeScript/10ScopesAndTypes/types/helpers/GameHelper.d.ts
vendored
Normal 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;
|
||||||
|
}
|
@ -9,7 +9,7 @@ export declare class LookupCollection {
|
|||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
export declare class HandbookHelper {
|
export declare class HandbookHelper {
|
||||||
private lookup;
|
protected lookup: LookupCollection;
|
||||||
hydrateLookup(lookup: LookupCollection): void;
|
hydrateLookup(lookup: LookupCollection): void;
|
||||||
getTemplatePrice(x: string): number;
|
getTemplatePrice(x: string): number;
|
||||||
templatesWithParent(x: string): string[];
|
templatesWithParent(x: string): string[];
|
||||||
|
@ -1,23 +1,27 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class HealthHelper {
|
export declare class HealthHelper {
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private healthConfig;
|
protected healthConfig: IHealthConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||||
resetVitality(sessionID: string): IAkiProfile;
|
resetVitality(sessionID: string): IAkiProfile;
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string): void;
|
||||||
private saveHealth;
|
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
||||||
private saveEffects;
|
protected saveEffects(pmcData: IPmcData, sessionID: string): void;
|
||||||
private addEffect;
|
protected addEffect(pmcData: IPmcData, sessionID: string, effect: {
|
||||||
private isEmpty;
|
bodyPart: string;
|
||||||
|
effectType: string;
|
||||||
|
}): void;
|
||||||
|
protected isEmpty(map: any): boolean;
|
||||||
}
|
}
|
||||||
|
@ -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 { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -17,26 +19,26 @@ import { TimeUtil } from "../utils/TimeUtil";
|
|||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class HideoutHelper {
|
export declare class HideoutHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private playerService;
|
protected playerService: PlayerService;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
static BITCOIN_FARM: string;
|
static BITCOIN_FARM: string;
|
||||||
private WATER_COLLECTOR;
|
protected WATER_COLLECTOR: string;
|
||||||
private BITCOIN;
|
protected BITCOIN: string;
|
||||||
private EXPEDITIONARY_FUEL_TANK;
|
protected EXPEDITIONARY_FUEL_TANK: string;
|
||||||
static NAME_BACKENDCOUNTERS_CRAFTING: string;
|
static NAME_BACKENDCOUNTERS_CRAFTING: string;
|
||||||
static SKILL_NAME_HIDEOUT: string;
|
static SKILL_NAME_HIDEOUT: string;
|
||||||
static HOUR_FOR_SKILL_CRAFTING: number;
|
static HOUR_FOR_SKILL_CRAFTING: number;
|
||||||
static SKILL_NAME_CRAFITING: string;
|
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);
|
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;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
@ -46,20 +48,20 @@ export declare class HideoutHelper {
|
|||||||
initProduction(recipeId: string, productionTime: number): Production;
|
initProduction(recipeId: string, productionTime: number): Production;
|
||||||
isProductionType(productive: Productive): productive is Production;
|
isProductionType(productive: Productive): productive is Production;
|
||||||
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
||||||
private applySkillXPBoost;
|
protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void;
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
private updateWaterCollector;
|
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
|
||||||
private doesWaterCollectorHaveFilter;
|
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
|
||||||
private updateFuel;
|
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): HideoutArea;
|
||||||
private updateWaterFilters;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, pwProd: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
private getAreaUpdObject;
|
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||||
private updateAirFilters;
|
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): HideoutArea;
|
||||||
private updateBitcoinFarm;
|
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||||
private getBTCSlots;
|
protected getBTCSlots(pmcData: IPmcData): number;
|
||||||
private getManagementSkillsSlots;
|
protected getManagementSkillsSlots(): number;
|
||||||
private hasManagementSkillSlots;
|
protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
|
||||||
private getHideoutManagementSkill;
|
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
||||||
private getHideoutManagementConsumptionBonus;
|
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||||
isProduction(productive: Productive): productive is Production;
|
isProduction(productive: Productive): productive is Production;
|
||||||
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;
|
getRandomAmountRewardForScavCase(itemToCalculate: ITemplateItem): number;
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class HttpServerHelper {
|
export declare class HttpServerHelper {
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private httpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
private mime;
|
protected mime: {
|
||||||
|
css: string;
|
||||||
|
bin: string;
|
||||||
|
html: string;
|
||||||
|
jpg: string;
|
||||||
|
js: string;
|
||||||
|
json: string;
|
||||||
|
png: string;
|
||||||
|
svg: string;
|
||||||
|
txt: string;
|
||||||
|
};
|
||||||
constructor(configServer: ConfigServer);
|
constructor(configServer: ConfigServer);
|
||||||
getMimeText(key: string): string;
|
getMimeText(key: string): string;
|
||||||
buildUrl(): string;
|
buildUrl(): string;
|
||||||
|
@ -8,15 +8,15 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
import { PaymentHelper } from "./PaymentHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
|
||||||
private removePlayer;
|
protected removePlayer(sessionID: string): void;
|
||||||
private removeMapAccessKey;
|
protected removeMapAccessKey(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
addUpdToMoneyFromRaid(items: Item[]): void;
|
addUpdToMoneyFromRaid(items: Item[]): void;
|
||||||
/**
|
/**
|
||||||
* Add positive karma for PMC kills
|
* Add positive karma for PMC kills
|
||||||
|
@ -5,6 +5,7 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe
|
|||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -25,26 +26,26 @@ export interface OwnerInventoryItems {
|
|||||||
isMail: boolean;
|
isMail: boolean;
|
||||||
}
|
}
|
||||||
export declare class InventoryHelper {
|
export declare class InventoryHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private httpResponse;
|
protected httpResponse: HttpResponseUtil;
|
||||||
private fenceService;
|
protected fenceService: FenceService;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private traderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private containerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private inventoryConfig;
|
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);
|
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;
|
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;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||||
private getSizeByInventoryItemHash;
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
|
||||||
private getInventoryItemHash;
|
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
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.
|
* 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
|
* @param {string} sessionID
|
||||||
* @returns Array
|
* @returns Array
|
||||||
*/
|
*/
|
||||||
private getStashSlotMap;
|
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
||||||
private getStashType;
|
protected getStashType(sessionID: string): string;
|
||||||
private getPlayerStashSize;
|
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to transfer an item from one profile to another.
|
* Internal helper function to transfer an item from one profile to another.
|
||||||
* fromProfileData: Profile of the source.
|
* 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.
|
* 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 {};
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
import { InsuredItem, IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
declare class ItemHelper {
|
declare class ItemHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, 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
|
* 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
|
* @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of
|
||||||
* @returns {array} The array of StackSlotItems
|
* @returns {array} The array of StackSlotItems
|
||||||
*/
|
*/
|
||||||
generateStackSlotItems(item: ITemplateItem, parentId: string): StackSlot[];
|
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
||||||
getItem(tpl: string): [boolean, ITemplateItem];
|
getItem(tpl: string): [boolean, ITemplateItem];
|
||||||
getItemQualityModifier(item: Item): number;
|
getItemQualityModifier(item: Item): number;
|
||||||
findAndReturnChildrenByItems(items: Item[], itemID: string): string[];
|
findAndReturnChildrenByItems(items: Item[], itemID: string): string[];
|
||||||
|
@ -2,8 +2,8 @@ import { INotification } from "../models/eft/notifier/INotifier";
|
|||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
import { NotificationService } from "../services/NotificationService";
|
import { NotificationService } from "../services/NotificationService";
|
||||||
export declare class NotificationSendHelper {
|
export declare class NotificationSendHelper {
|
||||||
private httpServer;
|
protected httpServer: IHttpServer;
|
||||||
private notificationService;
|
protected notificationService: NotificationService;
|
||||||
constructor(httpServer: IHttpServer, notificationService: NotificationService);
|
constructor(httpServer: IHttpServer, notificationService: NotificationService);
|
||||||
/**
|
/**
|
||||||
* Send notification message to the appropiate channel
|
* Send notification message to the appropiate channel
|
||||||
|
@ -2,11 +2,11 @@ import { INotification } from "../models/eft/notifier/INotifier";
|
|||||||
import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile";
|
import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile";
|
||||||
import { HttpServerHelper } from "./HttpServerHelper";
|
import { HttpServerHelper } from "./HttpServerHelper";
|
||||||
export declare class NotifierHelper {
|
export declare class NotifierHelper {
|
||||||
private httpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
/**
|
/**
|
||||||
* The default notification sent when waiting times out.
|
* The default notification sent when waiting times out.
|
||||||
*/
|
*/
|
||||||
private defaultNotification;
|
protected defaultNotification: INotification;
|
||||||
constructor(httpServerHelper: HttpServerHelper);
|
constructor(httpServerHelper: HttpServerHelper);
|
||||||
getDefaultNotification(): INotification;
|
getDefaultNotification(): INotification;
|
||||||
/** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */
|
/** Creates a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside */
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private lookup;
|
protected lookup: Record<string, string[]>;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
|
14
TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts
vendored
Normal file
14
TypeScript/10ScopesAndTypes/types/helpers/ProbabilityHelper.d.ts
vendored
Normal 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;
|
||||||
|
}
|
@ -28,6 +28,6 @@ export declare class ProfileHelper {
|
|||||||
getPmcProfile(sessionID: string): IPmcData;
|
getPmcProfile(sessionID: string): IPmcData;
|
||||||
getScavProfile(sessionID: string): IPmcData;
|
getScavProfile(sessionID: string): IPmcData;
|
||||||
getDefaultCounters(): Stats;
|
getDefaultCounters(): Stats;
|
||||||
private isWiped;
|
protected isWiped(sessionID: string): boolean;
|
||||||
private getServerVersion;
|
protected getServerVersion(): string;
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,5 @@ export declare class QuestConditionHelper {
|
|||||||
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
getLoyaltyConditions(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[];
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../mo
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -17,20 +18,20 @@ import { ProfileHelper } from "./ProfileHelper";
|
|||||||
import { RagfairServerHelper } from "./RagfairServerHelper";
|
import { RagfairServerHelper } from "./RagfairServerHelper";
|
||||||
import { TraderHelper } from "./TraderHelper";
|
import { TraderHelper } from "./TraderHelper";
|
||||||
export declare class QuestHelper {
|
export declare class QuestHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private ragfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private questConfig;
|
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);
|
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>;
|
static get STATUS(): Record<string, number>;
|
||||||
questStatus(pmcData: IPmcData, questID: string): string;
|
questStatus(pmcData: IPmcData, questID: string): string;
|
||||||
@ -47,7 +48,7 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
dumpQuests(quests: any, label?: any): void;
|
dumpQuests(quests: any, label?: any): void;
|
||||||
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
|
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||||
private processReward;
|
protected processReward(reward: Reward): any[];
|
||||||
getQuestRewardItems(quest: IQuest, state: string): Reward[];
|
getQuestRewardItems(quest: IQuest, state: string): Reward[];
|
||||||
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
|
addQuestToPMCData(pmcData: IPmcData, quest: Quest, newState: string, acceptedQuest: IAcceptQuestRequestData): void;
|
||||||
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
|
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;
|
changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void;
|
||||||
/**
|
/**
|
||||||
* Get List of All Quests as an array
|
* Get List of All Quests as an array
|
||||||
|
* @returns Array of IQuest objects
|
||||||
*/
|
*/
|
||||||
questValues(): IQuest[];
|
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;
|
cleanQuestConditions(quest: IQuest): IQuest;
|
||||||
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
||||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||||
getQuestLocaleIdFromDb(messageId: string, localisation?: string): string;
|
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;
|
getFindItemIdForQuestItem(itemTpl: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { Item } from "../models/eft/common/tables/IItem";
|
|||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -12,16 +13,16 @@ import { ItemHelper } from "./ItemHelper";
|
|||||||
import { TraderAssortHelper } from "./TraderAssortHelper";
|
import { TraderAssortHelper } from "./TraderAssortHelper";
|
||||||
import { UtilityHelper } from "./UtilityHelper";
|
import { UtilityHelper } from "./UtilityHelper";
|
||||||
export declare class RagfairHelper {
|
export declare class RagfairHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private traderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private handbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private ragfairLinkedItemService;
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
private utilityHelper;
|
protected utilityHelper: UtilityHelper;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Gets currency TAG from TPL
|
* Gets currency TAG from TPL
|
||||||
@ -31,7 +32,7 @@ export declare class RagfairHelper {
|
|||||||
getCurrencyTag(currency: string): string;
|
getCurrencyTag(currency: string): string;
|
||||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
||||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||||
private getCategoryList;
|
protected getCategoryList(handbookId: string): string[];
|
||||||
countCategories(result: IGetOffersResult): void;
|
countCategories(result: IGetOffersResult): void;
|
||||||
/**
|
/**
|
||||||
* Merges Root Items
|
* Merges Root Items
|
||||||
@ -39,5 +40,4 @@ export declare class RagfairHelper {
|
|||||||
*/
|
*/
|
||||||
mergeStackable(items: Item[]): Item[];
|
mergeStackable(items: Item[]): Item[];
|
||||||
getCurrencySymbol(currencyTpl: string): string;
|
getCurrencySymbol(currencyTpl: string): string;
|
||||||
formatCurrency(moneyAmount: number): string;
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
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 { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -19,31 +22,31 @@ import { RagfairHelper } from "./RagfairHelper";
|
|||||||
import { RagfairServerHelper } from "./RagfairServerHelper";
|
import { RagfairServerHelper } from "./RagfairServerHelper";
|
||||||
import { RagfairSortHelper } from "./RagfairSortHelper";
|
import { RagfairSortHelper } from "./RagfairSortHelper";
|
||||||
export declare class RagfairOfferHelper {
|
export declare class RagfairOfferHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private paymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
private presetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private ragfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
private ragfairSortHelper;
|
protected ragfairSortHelper: RagfairSortHelper;
|
||||||
private ragfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
private ragfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private static TPL_GOODS_SOLD;
|
protected static TPL_GOODS_SOLD: string;
|
||||||
private ragfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
private questConfig;
|
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);
|
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[];
|
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
getOffersForBuild(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;
|
processOffers(sessionID: string): boolean;
|
||||||
private getProfileOffers;
|
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
||||||
private deleteOfferByOfferId;
|
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
|
||||||
private completeOffer;
|
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
||||||
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import { SellResult } from "../models/eft/ragfair/IRagfairOffer";
|
import { SellResult } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class RagfairSellHelper {
|
export declare class RagfairSellHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private timeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number;
|
calculateSellChance(baseChance: number, offerPrice: number, requirementsPriceInRub: number): number;
|
||||||
rollForSale(sellChance: number, count: number): SellResult[];
|
rollForSale(sellChance: number, count: number): SellResult[];
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { MemberCategory } from "../models/enums/MemberCategory";
|
import { MemberCategory } from "../models/enums/MemberCategory";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
@ -11,18 +13,18 @@ import { DialogueHelper } from "./DialogueHelper";
|
|||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private hashUtil;
|
protected hashUtil: HashUtil;
|
||||||
private saveServer;
|
protected saveServer: SaveServer;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private dialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private ragfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
private questConfig;
|
protected questConfig: IQuestConfig;
|
||||||
private static TPL_GOODS_RETURNED;
|
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);
|
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
|
* Is item valid / on blacklist / quest item
|
||||||
@ -30,7 +32,7 @@ export declare class RagfairServerHelper {
|
|||||||
* @returns boolean
|
* @returns boolean
|
||||||
*/
|
*/
|
||||||
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
isItemValidRagfairItem(itemDetails: [boolean, ITemplateItem]): boolean;
|
||||||
private isItemBlacklisted;
|
protected isItemBlacklisted(itemTemplateId: string): boolean;
|
||||||
isTrader(userID: string): boolean;
|
isTrader(userID: string): boolean;
|
||||||
isPlayer(userID: string): boolean;
|
isPlayer(userID: string): boolean;
|
||||||
returnItems(sessionID: string, items: any[]): void;
|
returnItems(sessionID: string, items: any[]): void;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class RagfairSortHelper {
|
export declare class RagfairSortHelper {
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[];
|
sortOffers(offers: IRagfairOffer[], type: number, direction?: number): IRagfairOffer[];
|
||||||
private sortOffersByID;
|
protected sortOffersByID(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||||
private sortOffersByRating;
|
protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||||
private sortOffersByName;
|
protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||||
private sortOffersByPrice;
|
protected sortOffersByPrice(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||||
private sortOffersByExpiry;
|
protected sortOffersByExpiry(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
export declare class RagfairTaxHelper {
|
export declare class RagfairTaxHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private ragfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
|
||||||
calculateTax(item: Item, pmcData: IPmcData, requirementsValue: number, offerItemCount: number, sellInOnePiece: boolean): number;
|
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;
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem, Props } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class RepairHelper {
|
export declare class RepairHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private randomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private configServer;
|
protected configServer: ConfigServer;
|
||||||
private repairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
updateItemDurability(itemToRepairId: string, amountToRepair: number, pmcData: IPmcData, useRepairKit?: boolean): Item;
|
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit?: boolean): Item;
|
||||||
private getRandomisedArmorRepairDegredationValue;
|
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number): number;
|
||||||
private getRandomisedWeaponRepairDegredationValue;
|
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, armorMax: number): number;
|
||||||
isWeaponTemplate(tpl: string): boolean;
|
isWeaponTemplate(tpl: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ export interface OwnerInventoryItems {
|
|||||||
isMail: boolean;
|
isMail: boolean;
|
||||||
}
|
}
|
||||||
export declare class SecureContainerHelper {
|
export declare class SecureContainerHelper {
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(itemHelper: ItemHelper);
|
constructor(itemHelper: ItemHelper);
|
||||||
getSecureContainerItems(items: Item[]): string[];
|
getSecureContainerItems(items: Item[]): string[];
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Upd } from "../models/eft/common/tables/IItem";
|
import { Item, Upd } from "../models/eft/common/tables/IItem";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData";
|
||||||
@ -12,14 +12,14 @@ import { RagfairServer } from "../servers/RagfairServer";
|
|||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
export declare class TradeHelper {
|
export declare class TradeHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private itemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
private traderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
private itemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
private paymentService;
|
protected paymentService: PaymentService;
|
||||||
private fenceService;
|
protected fenceService: FenceService;
|
||||||
private inventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
private ragfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, 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
|
* Buy item from flea or trader
|
||||||
@ -39,6 +39,6 @@ export declare class TradeHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
private incrementAssortBuyCount;
|
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
||||||
private checkPurchaseIsWithinTraderItemLimit;
|
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -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 { RagfairAssortGenerator } from "../generators/RagfairAssortGenerator";
|
||||||
import { RagfairOfferGenerator } from "../generators/RagfairOfferGenerator";
|
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 { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
@ -9,15 +10,33 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
import { AssortHelper } from "./AssortHelper";
|
import { AssortHelper } from "./AssortHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class TraderAssortHelper {
|
export declare class TraderAssortHelper {
|
||||||
private logger;
|
protected logger: ILogger;
|
||||||
private jsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
private databaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
private profileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
private assortHelper;
|
protected assortHelper: AssortHelper;
|
||||||
private ragfairAssortGenerator;
|
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||||
private ragfairOfferGenerator;
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
private traderAssortService;
|
protected traderAssortService: TraderAssortService;
|
||||||
private fenceService;
|
protected fenceService: FenceService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, 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;
|
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
Loading…
x
Reference in New Issue
Block a user