Update for 3.2.5

This commit is contained in:
Chomp 2022-10-17 19:50:31 +01:00
parent fd4f213982
commit 3e2d95eb2e
706 changed files with 4231 additions and 1786 deletions

View File

@ -1,6 +1,7 @@
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGlobals } from "../models/eft/common/IGlobals"; import { IGlobals } from "../models/eft/common/IGlobals";
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem"; import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
import { IQuest } from "../models/eft/common/tables/IQuest"; import { IQuest } from "../models/eft/common/tables/IQuest";
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea"; import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
@ -18,7 +19,7 @@ export declare class DataCallbacks {
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>;
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>; getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;

View File

@ -1,8 +1,10 @@
import { GameController } from "../controllers/GameController"; import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData"; import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -17,8 +19,8 @@ declare class GameCallbacks {
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>; getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData; reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;

View File

@ -5,16 +5,16 @@ import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothin
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData"; import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
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 {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, 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;

View File

@ -3,7 +3,9 @@ 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 { Config } from "../models/eft/common/IGlobals"; import { Config } from "../models/eft/common/IGlobals";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
@ -37,6 +39,6 @@ export declare class GameController {
protected adjustLabsRaiderSpawnRate(): void; protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void; protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse; getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): any[]; getServer(): IServerDetails[];
getValidGameVersion(): any; getValidGameVersion(): ICheckVersionResponse;
} }

View File

@ -8,16 +8,16 @@ import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestD
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData"; import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthController { export declare class HealthController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
/** /**
* stores in-raid player health * stores in-raid player health
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -19,7 +19,7 @@ import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgrad
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -40,7 +40,7 @@ export declare class HideoutController {
protected playerService: PlayerService; protected playerService: PlayerService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
@ -49,7 +49,7 @@ export declare class HideoutController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected static nameBackendCountersCrafting: string; protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
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;
/** /**

View File

@ -8,6 +8,7 @@ import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
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 { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
@ -31,6 +32,7 @@ export declare class InraidController {
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
protected inRaidHelper: InRaidHelper; protected inRaidHelper: InRaidHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
@ -68,4 +70,5 @@ export declare class InraidController {
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void; protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void; protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void; protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
getAirdropConfig(): IAirdropConfig;
} }

View File

@ -8,7 +8,7 @@ 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 { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -19,7 +19,7 @@ import { TimeUtil } from "../utils/TimeUtil";
export declare class InsuranceController { export declare class InsuranceController {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
@ -30,7 +30,7 @@ export declare class InsuranceController {
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; 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, eventOutputHolder: EventOutputHolder, 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;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,3 +1,4 @@
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { InventoryHelper } from "../helpers/InventoryHelper"; 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";
@ -22,7 +23,6 @@ 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";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { FenceService } from "../services/FenceService"; import { FenceService } from "../services/FenceService";
import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairOfferService } from "../services/RagfairOfferService";
@ -39,8 +39,8 @@ export declare class InventoryController {
protected ragfairOfferService: RagfairOfferService; protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder);
/** /**
* Move Item * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId

View File

@ -1,10 +1,10 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
export declare class NoteController { export declare class NoteController {
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(itemEventRouter: ItemEventRouter); constructor(eventOutputHolder: EventOutputHolder);
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;
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,15 +3,15 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData"; import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
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 {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, 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;
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -11,7 +11,7 @@ import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRe
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { LocaleService } from "../services/LocaleService"; import { LocaleService } from "../services/LocaleService";
@ -20,7 +20,7 @@ import { TimeUtil } from "../utils/TimeUtil";
export declare class QuestController { export declare class QuestController {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
@ -31,7 +31,7 @@ export declare class QuestController {
protected localeService: LocaleService; protected localeService: LocaleService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
/** /**
* Get all quests visible to player * Get all quests visible to player
* Exclude quests with incomplete preconditions (level/loyalty) * Exclude quests with incomplete preconditions (level/loyalty)

View File

@ -24,7 +24,7 @@ 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 { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RagfairServer } from "../servers/RagfairServer"; import { RagfairServer } from "../servers/RagfairServer";
@ -42,7 +42,7 @@ export declare class RagfairController {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
@ -64,7 +64,7 @@ export declare class RagfairController {
protected ragfairOfferGenerator: RagfairOfferGenerator; protected ragfairOfferGenerator: RagfairOfferGenerator;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; 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, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
/** /**
* Get offers for the client based on type of search being performed * Get offers for the client based on type of search being performed

View File

@ -7,13 +7,13 @@ import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionData
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "../services/PaymentService"; import { PaymentService } from "../services/PaymentService";
import { RepairService } from "../services/RepairService"; import { RepairService } from "../services/RepairService";
export declare class RepairController { export declare class RepairController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -21,7 +21,7 @@ export declare class RepairController {
protected repairHelper: RepairHelper; protected repairHelper: RepairHelper;
protected repairService: RepairService; protected repairService: RepairService;
protected repairConfig: IRepairConfig; protected repairConfig: IRepairConfig;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
/** /**
* Repair with trader * Repair with trader
* @param sessionID session id * @param sessionID session id

View File

@ -13,7 +13,7 @@ import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQ
import { ELocationName } from "../models/enums/ELocationName"; import { ELocationName } from "../models/enums/ELocationName";
import { IQuestConfig, 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService"; import { ItemFilterService } from "../services/ItemFilterService";
@ -63,13 +63,13 @@ export declare class RepeatableQuestController {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected objectId: ObjectId; protected objectId: ObjectId;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer); constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, 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.

View File

@ -6,15 +6,15 @@ import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRag
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { Upd } from "../models/eft/common/tables/IItem"; import { Upd } from "../models/eft/common/tables/IItem";
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
declare class TradeController { declare class TradeController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected tradeHelper: TradeHelper; protected tradeHelper: TradeHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; 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;
} }

View File

@ -1,3 +1,4 @@
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { TraderAssortHelper } from "../helpers/TraderAssortHelper"; import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -17,8 +18,9 @@ export declare class TraderController {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected traderAssortService: TraderAssortService; protected traderAssortService: TraderAssortService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, jsonUtil: JsonUtil); constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
/** /**
* Runs when onLoad event is fired * Runs when onLoad event is fired
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService * Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService

View File

@ -1,10 +1,10 @@
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { IPmcData } from "../models/eft/common/IPmcData"; 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 {
protected itemEvenRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(itemEvenRouter: ItemEventRouter); constructor(eventOutputHolder: EventOutputHolder);
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;
} }

View File

@ -0,0 +1,28 @@
import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService";
export declare class FenceBaseAssortGenerator {
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper;
protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
/**
* Create base fence assorts dynamically and store in db
*/
generateFenceBaseAssorts(): void;
/**
* Check if item is valid for being added to fence assorts
* @param item Item to check
* @returns true if valid fence item
*/
protected isValidFenceItem(item: ITemplateItem): boolean;
}

View File

@ -17,8 +17,8 @@ export declare class LootGenerator {
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService); constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService);
/** /**
* Generate a list of items based on options passed in * Generate a list of items based on configuration options parameter
* @param options parameters to adjust what loot is generated * @param options parameters to adjust how loot is generated
* @returns An array of loot items * @returns An array of loot items
*/ */
createRandomloot(options: LootRequest): LootItem[]; createRandomloot(options: LootRequest): LootItem[];
@ -44,7 +44,13 @@ export declare class LootGenerator {
max: number; max: number;
}>, options: LootRequest, result: LootItem[]): boolean; }>, options: LootRequest, result: LootItem[]): boolean;
/** /**
* * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values
* @param item item to get stack count of
* @param options loot options
* @returns stack count
*/
protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number;
/**
* Find a random item in items.json and add to result array * Find a random item in items.json and add to result array
* @param globalDefaultPresets presets to choose from * @param globalDefaultPresets presets to choose from
* @param itemTypeCounts item limit counts * @param itemTypeCounts item limit counts

View File

@ -39,6 +39,13 @@ export declare class RagfairOfferGenerator {
protected ragfairConfig: IRagfairConfig; 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, ragfairCategoriesService: RagfairCategoriesService, 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, ragfairCategoriesService: RagfairCategoriesService, 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;
/**
* Get avatar url from trader table in db
* @param isTrader Is user we're getting avatar for a trader
* @param userId persons id to get avatar of
* @returns url of avatar
*/
protected getAvatarUrl(isTrader: boolean, userId: string): string;
/** /**
* Convert a count of currency into roubles * Convert a count of currency into roubles
* @param currencyCount amount of currency to convert into roubles * @param currencyCount amount of currency to convert into roubles

View File

@ -1,6 +1,7 @@
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile"; import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
import { MessageType } from "../models/enums/MessageType"; import { MessageType } from "../models/enums/MessageType";
import { ILogger } from "../models/spt/utils/ILogger";
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";
@ -8,13 +9,14 @@ 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 {
protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper; protected notifierHelper: NotifierHelper;
protected notificationSendHelper: NotificationSendHelper; protected notificationSendHelper: NotificationSendHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); constructor(logger: ILogger, 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;
/** /**
* Add a templated message to the dialogue. * Add a templated message to the dialogue.
@ -23,7 +25,7 @@ export declare class DialogueHelper {
* @param sessionID * @param sessionID
* @param rewards * @param rewards
*/ */
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void;
/** /**
* Get the preview contents of the last message in a dialogue. * Get the preview contents of the last message in a dialogue.
* @param dialogue * @param dialogue

View File

@ -1,3 +1,4 @@
import { DatabaseServer } from "../servers/DatabaseServer";
declare class LookupItem { declare class LookupItem {
byId: Record<number, string>; byId: Record<number, string>;
byParent: Record<string, string[]>; byParent: Record<string, string[]>;
@ -9,17 +10,35 @@ export declare class LookupCollection {
constructor(); constructor();
} }
export declare class HandbookHelper { export declare class HandbookHelper {
protected lookup: LookupCollection; protected databaseServer: DatabaseServer;
hydrateLookup(lookup: LookupCollection): void; protected handbookPriceCache: LookupCollection;
getTemplatePrice(x: string): number; constructor(databaseServer: DatabaseServer);
hydrateLookup(): void;
/**
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
* If no values found, return 1
* @param tpl item tpl to look up price for
* @returns price in roubles
*/
getTemplatePrice(tpl: string): number;
/**
* all items in template with the given parent category
* @param x
* @returns string array
*/
templatesWithParent(x: string): string[]; templatesWithParent(x: string): string[];
isCategory(x: string): boolean; /**
* Does category exist in handbook cache
* @param category
* @returns true if exists in cache
*/
isCategory(category: string): boolean;
childrenCategories(x: string): string[]; childrenCategories(x: string): string[];
/** /**
* Gets Currency to Ruble conversion Value * Convert currency into roubles
* @param {number} value * @param {number} value
* @param {string} currencyFrom * @param {string} currencyFrom
* @returns number * @returns get rouble value of inputted currency
*/ */
inRUB(value: number, currencyFrom: string): number; inRUB(value: number, currencyFrom: string): number;
/** /**

View File

@ -8,7 +8,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PlayerService } from "../services/PlayerService"; import { PlayerService } from "../services/PlayerService";
@ -24,7 +24,7 @@ export declare class HideoutHelper {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
@ -35,7 +35,7 @@ export declare class HideoutHelper {
static bitcoin: string; static bitcoin: string;
static expeditionaryFuelTank: string; static expeditionaryFuelTank: string;
protected hideoutConfig: IHideoutConfig; 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, eventOutputHolder: EventOutputHolder, 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;
/** /**
* This convinience function intialies new Production Object * This convinience function intialies new Production Object

View File

@ -1,10 +1,10 @@
import { INotification } from "../models/eft/notifier/INotifier"; import { INotification } from "../models/eft/notifier/INotifier";
import { HttpServer } from "../servers/HttpServer"; import { WebSocketServer } from "../servers/WebSocketServer";
import { NotificationService } from "../services/NotificationService"; import { NotificationService } from "../services/NotificationService";
export declare class NotificationSendHelper { export declare class NotificationSendHelper {
protected httpServer: HttpServer; protected webSocketServer: WebSocketServer;
protected notificationService: NotificationService; protected notificationService: NotificationService;
constructor(httpServer: HttpServer, notificationService: NotificationService); constructor(webSocketServer: WebSocketServer, notificationService: NotificationService);
/** /**
* Send notification message to the appropiate channel * Send notification message to the appropiate channel
*/ */

View File

@ -6,7 +6,7 @@ import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRe
import { QuestStatus } from "../models/enums/QuestStatus"; import { QuestStatus } from "../models/enums/QuestStatus";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { LocaleService } from "../services/LocaleService"; import { LocaleService } from "../services/LocaleService";
@ -25,7 +25,7 @@ export declare class QuestHelper {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService; protected localeService: LocaleService;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
@ -35,7 +35,7 @@ export declare class QuestHelper {
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
/** /**
* Get status of a quest by quest id * Get status of a quest by quest id
* @param pmcData Profile to search * @param pmcData Profile to search

View File

@ -6,7 +6,7 @@ import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -27,7 +27,7 @@ export declare class RagfairOfferHelper {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
@ -45,9 +45,15 @@ export declare class RagfairOfferHelper {
protected static goodSoldTemplate: string; protected static goodSoldTemplate: string;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, 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[];
/**
* Check if trader offers' BuyRestrictionMax value has been reached
* @param offer offer to check restriction properties of
* @returns true if restriction reached, false if no restrictions/not reached
*/
protected traderBuyRestrictionReached(offer: IRagfairOffer): boolean;
/** /**
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check * @param offers Offers to check

View File

@ -7,20 +7,20 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
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";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { RagfairServer } from "../servers/RagfairServer"; 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 {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer);
/** /**
* Buy item from flea or trader * Buy item from flea or trader
* @param pmcData * @param pmcData

View File

@ -1,4 +1,5 @@
import { QuestRewardType } from "../../../enums/QuestRewardType"; import { QuestRewardType } from "../../../enums/QuestRewardType";
import { QuestStatus } from "../../../enums/QuestStatus";
import { Item } from "./IItem"; import { Item } from "./IItem";
export interface IQuest { export interface IQuest {
QuestName: string; QuestName: string;
@ -47,7 +48,7 @@ export interface AvailableForProps {
compareMethod?: string; compareMethod?: string;
visibilityConditions?: VisibilityCondition[]; visibilityConditions?: VisibilityCondition[];
target?: string | string[]; target?: string | string[];
status?: number[]; status?: QuestStatus[];
onlyFoundInRaid?: boolean; onlyFoundInRaid?: boolean;
oneSessionOnly?: boolean; oneSessionOnly?: boolean;
doNotResetIfCounterCompleted?: boolean; doNotResetIfCounterCompleted?: boolean;
@ -99,7 +100,7 @@ export interface Rewards {
FailRestartable: Reward[]; FailRestartable: Reward[];
Expired: Reward[]; Expired: Reward[];
} }
export interface Reward { export interface Reward extends Item {
value?: string | number; value?: string | number;
id: string; id: string;
type: QuestRewardType; type: QuestRewardType;

View File

@ -2,7 +2,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
export interface IGetFriendListDataResponse { export interface IGetFriendListDataResponse {
Friends: Friend[]; Friends: Friend[];
Ignore: any[]; Ignore: any[];
InIgnoreList: any[]; InIgnoreList: string[];
} }
export interface Friend { export interface Friend {
_id: string; _id: string;

View File

@ -0,0 +1,4 @@
export interface ICheckVersionResponse {
isvalid: boolean;
latestVersion: string;
}

View File

@ -0,0 +1,4 @@
export interface IServerDetails {
ip: string;
port: number;
}

View File

@ -4,6 +4,7 @@ export interface GetProfileStatusResponseData {
} }
export interface ProfileData { export interface ProfileData {
profileid: string; profileid: string;
profileToken: string;
status: string; status: string;
sid: string; sid: string;
ip: string; ip: string;

View File

@ -37,12 +37,12 @@ export interface Dialogue {
attachmentsNew: number; attachmentsNew: number;
} }
export interface DialogueInfo { export interface DialogueInfo {
_id: string;
type: MessageType;
message: MessagePreview;
pinned: boolean;
new: number;
attachmentsNew: number; attachmentsNew: number;
new: number;
type: MessageType;
pinned: boolean;
message: MessagePreview;
_id: string;
} }
export interface Message { export interface Message {
_id: string; _id: string;

View File

@ -1,6 +1,9 @@
export declare enum BaseClasses { export declare enum BaseClasses {
WEAPON = "5422acb9af1c889c16000029", WEAPON = "5422acb9af1c889c16000029",
ARMOR = "5448e54d4bdc2dcc718b4568", ARMOR = "5448e54d4bdc2dcc718b4568",
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
HEADWEAR = "5a341c4086f77401f2541505",
FACECOVER = "5a341c4686f77469e155819e",
VEST = "5448e5284bdc2dcb718b4567", VEST = "5448e5284bdc2dcb718b4567",
BACKPACK = "5448e53e4bdc2d60728b4567", BACKPACK = "5448e53e4bdc2d60728b4567",
VISORS = "5448e5724bdc2ddf718b4568", VISORS = "5448e5724bdc2ddf718b4568",

View File

@ -25,6 +25,6 @@ export interface AirdropLoot {
itemTypeWhitelist: string[]; itemTypeWhitelist: string[];
/** key: item base type: value: max count */ /** key: item base type: value: max count */
itemLimits: Record<string, number>; itemLimits: Record<string, number>;
itemStackLimits: Record<string, MinMax>;
armorLevelWhitelist: number[]; armorLevelWhitelist: number[];
moneyStackLimits: Record<string, MinMax>;
} }

View File

@ -17,5 +17,8 @@ export interface FenceConfig {
assortSize: number; assortSize: number;
maxPresetsPercent: number; maxPresetsPercent: number;
presetPriceMult: number; presetPriceMult: number;
itemPriceMult: number;
regenerateAssortsOnRefresh: boolean;
itemTypeLimits: Record<string, number>;
blacklist: string[]; blacklist: string[];
} }

View File

@ -6,6 +6,6 @@ export declare class LootRequest {
itemTypeWhitelist: string[]; itemTypeWhitelist: string[];
/** key: item base type: value: max count */ /** key: item base type: value: max count */
itemLimits: Record<string, number>; itemLimits: Record<string, number>;
itemStackLimits: Record<string, MinMax>;
armorLevelWhitelist: number[]; armorLevelWhitelist: number[];
moneyStackLimits: Record<string, MinMax>;
} }

View File

@ -0,0 +1,11 @@
import { JsonUtil } from "../utils/JsonUtil";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class EventOutputHolder {
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper;
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper);
protected output: IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse;
resetOutput(sessionID: string): void;
}

View File

@ -1,17 +1,14 @@
import { JsonUtil } from "../utils/JsonUtil";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { ItemEventRouterDefinition } from "../di/Router"; import { ItemEventRouterDefinition } from "../di/Router";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "./EventOutputHolder";
export declare class ItemEventRouter { export declare class ItemEventRouter {
protected logger: ILogger; protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouters: ItemEventRouterDefinition[]; protected itemEventRouters: ItemEventRouterDefinition[];
constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); protected eventOutputHolder: EventOutputHolder;
protected output: IItemEventRouterResponse; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], eventOutputHolder: EventOutputHolder);
handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse;
protected resetOutput(sessionID: string): void;
} }

View File

@ -1,34 +1,24 @@
/// <reference types="node" /> /// <reference types="node" />
import http, { IncomingMessage, ServerResponse } from "http"; import http, { IncomingMessage, ServerResponse } from "http";
import WebSocket from "ws";
import { ApplicationContext } from "../context/ApplicationContext"; import { ApplicationContext } from "../context/ApplicationContext";
import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { NotifierHelper } from "../helpers/NotifierHelper";
import { INotification } from "../models/eft/notifier/INotifier";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
import { ConfigServer } from "./ConfigServer"; import { ConfigServer } from "./ConfigServer";
import { DatabaseServer } from "./DatabaseServer"; import { DatabaseServer } from "./DatabaseServer";
import { IHttpListener } from "./http/IHttpListener"; import { IHttpListener } from "./http/IHttpListener";
import { WebSocketServer } from "./WebSocketServer";
export declare class HttpServer { export declare class HttpServer {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
protected httpListeners: IHttpListener[]; protected httpListeners: IHttpListener[];
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext); protected webSocketServer: WebSocketServer;
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected webSockets: {};
protected websocketPingHandler: any;
getCookies(req: http.IncomingMessage): any; getCookies(req: http.IncomingMessage): any;
sendMessage(sessionID: string, output: INotification): void;
isConnectionWebSocket(sessionID: string): boolean;
handleRequest(req: IncomingMessage, resp: ServerResponse): void; handleRequest(req: IncomingMessage, resp: ServerResponse): void;
load(): void; load(): void;
protected getRandomisedMessage(): string;
protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void;
} }

View File

@ -0,0 +1,25 @@
/// <reference types="node" />
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import WebSocket from "ws";
import http, { IncomingMessage } from "http";
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
import { INotification } from "../models/eft/notifier/INotifier";
import { ConfigServer } from "./ConfigServer";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
export declare class WebSocketServer {
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected configServer: ConfigServer;
protected httpServerHelper: HttpServerHelper;
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, httpServerHelper: HttpServerHelper);
protected httpConfig: IHttpConfig;
protected defaultNotification: INotification;
protected webSockets: Record<string, WebSocket.WebSocket>;
protected websocketPingHandler: any;
setupWebSocket(httpServer: http.Server): void;
sendMessage(sessionID: string, output: INotification): void;
protected getRandomisedMessage(): string;
isConnectionWebSocket(sessionID: string): boolean;
protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void;
}

View File

@ -3,6 +3,8 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper"; import { PresetHelper } from "../helpers/PresetHelper";
import { FenceLevel } from "../models/eft/common/IGlobals"; import { FenceLevel } from "../models/eft/common/IGlobals";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ITraderConfig } from "../models/spt/config/ITraderConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -41,6 +43,13 @@ export declare class FenceService {
* @returns ITraderAssort * @returns ITraderAssort
*/ */
getFenceAssorts(pmcProfile: IPmcData): ITraderAssort; getFenceAssorts(pmcProfile: IPmcData): ITraderAssort;
/**
* Adjust assorts price by a modifier
* @param item
* @param assort
* @param modifier
*/
protected adjustItemPriceByModifier(item: Item, assort: ITraderAssort, modifier: number): void;
/** /**
* Get fence assorts with no price adjustments based on fence rep * Get fence assorts with no price adjustments based on fence rep
* @returns ITraderAssort * @returns ITraderAssort
@ -96,6 +105,21 @@ export declare class FenceService {
* @param assorts object to add assorts to * @param assorts object to add assorts to
*/ */
protected createAssorts(assortCount: number, assorts: ITraderAssort): void; protected createAssorts(assortCount: number, assorts: ITraderAssort): void;
/**
* Randomise items' upd properties e.g. med packs/weapons/armor
* @param itemDetails Item being randomised
* @param itemToAdjust Item being edited
*/
protected randomiseItemUpdProperties(itemDetails: ITemplateItem, itemToAdjust: Item): void;
/**
* Construct item limit record to hold max and current item count
* @param limits limits as defined in config
* @returns record, key: item tplId, value: current/max item count allowed
*/
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
current: number;
max: number;
}>;
/** /**
* Get the next update timestamp for fence * Get the next update timestamp for fence
* @returns future timestamp * @returns future timestamp

View File

@ -2,7 +2,7 @@ import { IItemConfig } from "../models/spt/config/IItemConfig";
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";
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json */ /** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
export declare class ItemFilterService { export declare class ItemFilterService {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;

View File

@ -5,7 +5,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -20,14 +20,14 @@ export declare class RagfairOfferService {
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected ragfairCategoriesService: RagfairCategoriesService; protected ragfairCategoriesService: RagfairCategoriesService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected playerOffersLoaded: boolean; protected playerOffersLoaded: boolean;
protected expiredOffers: Item[]; protected expiredOffers: Item[];
protected offers: IRagfairOffer[]; protected offers: IRagfairOffer[];
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, configServer: ConfigServer);
/** /**
* Get all offers * Get all offers
* @returns IRagfairOffer array * @returns IRagfairOffer array

View File

@ -10,7 +10,8 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
export declare class RagfairPriceService { import { OnLoad } from "../di/OnLoad";
export declare class RagfairPriceService implements OnLoad {
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected logger: ILogger; protected logger: ILogger;
@ -19,21 +20,38 @@ export declare class RagfairPriceService {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected generatedDynamicPrices: boolean;
protected generatedStaticPrices: boolean;
protected prices: IRagfairServerPrices; protected prices: IRagfairServerPrices;
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer);
onLoad(): void;
getRoute(): string;
/**
* Iterate over all items of type "Item" in db and get template price, store in cache
*/
generateStaticPrices(): void; generateStaticPrices(): void;
generateDynamicPrices(): void; protected generateDynamicPrices(): void;
hasDynamicPrices(): boolean; /**
getDynamicPrice(itemTpl: string): number; * Get the dynamic price for an item. If value doesn't exist, use static (handbook0) value.
getAllFleaPrices(): Record<string, number>; * if no static value, return 1
* @param tplId Item tpl id to get price for
* @returns price in roubles
*/
getFleaPriceForItem(tplId: string): number; getFleaPriceForItem(tplId: string): number;
/** /**
* Check to see if an items price is below its handbook price and adjust accoring to values set to config/ragfair.json * get the dynamic (flea) price for an item
* @param itemPrice price of item * Grabs prices from prices.json and stores in class if none currently exist
* @param itemTpl item template Id being checked * @param itemTpl item template id to look up
* @returns adjusted price value in roubles * @returns price in roubles
*/ */
protected adjustPriceIfBelowHandbook(itemPrice: number, itemTpl: string): number; getDynamicPriceForItem(itemTpl: string): number;
/**
* Grab the static (handbook) for an item by its tplId
* @param itemTpl item template id to look up
* @returns price in roubles
*/
getStaticPriceForItem(itemTpl: string): number;
getAllFleaPrices(): Record<string, number>;
/** /**
* Get the percentage difference between two values * Get the percentage difference between two values
* @param a numerical value a * @param a numerical value a
@ -41,9 +59,15 @@ export declare class RagfairPriceService {
* @returns different in percent * @returns different in percent
*/ */
protected getPriceDifference(a: number, b: number): number; protected getPriceDifference(a: number, b: number): number;
getStaticPriceForItem(tplId: string): number;
getBarterPrice(barterScheme: IBarterScheme[]): number; getBarterPrice(barterScheme: IBarterScheme[]): number;
getDynamicOfferPrice(items: Item[], desiredCurrency: string): number; getDynamicOfferPrice(items: Item[], desiredCurrency: string): number;
/**
* Check to see if an items price is below its handbook price and adjust accoring to values set to config/ragfair.json
* @param itemPrice price of item
* @param itemTpl item template Id being checked
* @returns adjusted price value in roubles
*/
protected adjustPriceIfBelowHandbook(itemPrice: number, itemTpl: string): number;
/** /**
* Multiply the price by a randomised curve where n = 2, shift = 2 * Multiply the price by a randomised curve where n = 2, shift = 2
* @param existingPrice price to alter * @param existingPrice price to alter
@ -58,7 +82,7 @@ export declare class RagfairPriceService {
* @param existingPrice price of existing base weapon * @param existingPrice price of existing base weapon
* @returns * @returns
*/ */
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
/** /**
* Attempt to get the default preset for a weapon, failing that get the first preset in the array * Attempt to get the default preset for a weapon, failing that get the first preset in the array
* (assumes default = has encyclopedia entry) * (assumes default = has encyclopedia entry)

View File

@ -9,13 +9,11 @@ import { RepairKitsInfo } from "../models/eft/repair/IRepairActionDataRequest";
import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest"; import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { 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 { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "./PaymentService"; import { PaymentService } from "./PaymentService";
export declare class RepairService { export declare class RepairService {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -23,7 +21,7 @@ export declare class RepairService {
protected repairHelper: RepairHelper; protected repairHelper: RepairHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
repairConfig: IRepairConfig; repairConfig: IRepairConfig;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
/** /**
* Use trader to repair an items durability * Use trader to repair an items durability
* @param sessionID Session id * @param sessionID Session id

View File

@ -1,6 +1,7 @@
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGlobals } from "../models/eft/common/IGlobals"; import { IGlobals } from "../models/eft/common/IGlobals";
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem"; import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
import { IQuest } from "../models/eft/common/tables/IQuest"; import { IQuest } from "../models/eft/common/tables/IQuest";
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea"; import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
@ -18,7 +19,7 @@ export declare class DataCallbacks {
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>;
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>; getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;

View File

@ -1,8 +1,10 @@
import { GameController } from "../controllers/GameController"; import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData"; import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -17,8 +19,8 @@ declare class GameCallbacks {
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>; getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData; reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;

View File

@ -5,16 +5,16 @@ import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothin
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData"; import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
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 {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, 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;

View File

@ -3,7 +3,9 @@ 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 { Config } from "../models/eft/common/IGlobals"; import { Config } from "../models/eft/common/IGlobals";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
@ -37,6 +39,6 @@ export declare class GameController {
protected adjustLabsRaiderSpawnRate(): void; protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void; protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse; getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): any[]; getServer(): IServerDetails[];
getValidGameVersion(): any; getValidGameVersion(): ICheckVersionResponse;
} }

View File

@ -8,16 +8,16 @@ import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestD
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData"; import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthController { export declare class HealthController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
/** /**
* stores in-raid player health * stores in-raid player health
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -19,7 +19,7 @@ import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgrad
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -40,7 +40,7 @@ export declare class HideoutController {
protected playerService: PlayerService; protected playerService: PlayerService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
@ -49,7 +49,7 @@ export declare class HideoutController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected static nameBackendCountersCrafting: string; protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
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;
/** /**

View File

@ -8,6 +8,7 @@ import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
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 { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
@ -31,6 +32,7 @@ export declare class InraidController {
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
protected inRaidHelper: InRaidHelper; protected inRaidHelper: InRaidHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void; addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
@ -68,4 +70,5 @@ export declare class InraidController {
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void; protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void; protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void; protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
getAirdropConfig(): IAirdropConfig;
} }

View File

@ -8,7 +8,7 @@ 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 { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -19,7 +19,7 @@ import { TimeUtil } from "../utils/TimeUtil";
export declare class InsuranceController { export declare class InsuranceController {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
@ -30,7 +30,7 @@ export declare class InsuranceController {
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig; 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, eventOutputHolder: EventOutputHolder, 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;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,3 +1,4 @@
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { InventoryHelper } from "../helpers/InventoryHelper"; 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";
@ -22,7 +23,6 @@ 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";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { FenceService } from "../services/FenceService"; import { FenceService } from "../services/FenceService";
import { RagfairOfferService } from "../services/RagfairOfferService"; import { RagfairOfferService } from "../services/RagfairOfferService";
@ -39,8 +39,8 @@ export declare class InventoryController {
protected ragfairOfferService: RagfairOfferService; protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder);
/** /**
* Move Item * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId

View File

@ -1,10 +1,10 @@
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { INoteActionData } from "../models/eft/notes/INoteActionData"; import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
export declare class NoteController { export declare class NoteController {
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(itemEventRouter: ItemEventRouter); constructor(eventOutputHolder: EventOutputHolder);
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;
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,15 +3,15 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData"; import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
import { WeaponBuild } from "../models/eft/profile/IAkiProfile"; import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
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 {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer); constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, 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;
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse; removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -11,7 +11,7 @@ import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRe
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData"; import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { LocaleService } from "../services/LocaleService"; import { LocaleService } from "../services/LocaleService";
@ -20,7 +20,7 @@ import { TimeUtil } from "../utils/TimeUtil";
export declare class QuestController { export declare class QuestController {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
@ -31,7 +31,7 @@ export declare class QuestController {
protected localeService: LocaleService; protected localeService: LocaleService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
/** /**
* Get all quests visible to player * Get all quests visible to player
* Exclude quests with incomplete preconditions (level/loyalty) * Exclude quests with incomplete preconditions (level/loyalty)

View File

@ -24,7 +24,7 @@ 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 { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RagfairServer } from "../servers/RagfairServer"; import { RagfairServer } from "../servers/RagfairServer";
@ -42,7 +42,7 @@ export declare class RagfairController {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
@ -64,7 +64,7 @@ export declare class RagfairController {
protected ragfairOfferGenerator: RagfairOfferGenerator; protected ragfairOfferGenerator: RagfairOfferGenerator;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; 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, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
/** /**
* Get offers for the client based on type of search being performed * Get offers for the client based on type of search being performed

View File

@ -7,13 +7,13 @@ import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionData
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest"; import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "../services/PaymentService"; import { PaymentService } from "../services/PaymentService";
import { RepairService } from "../services/RepairService"; import { RepairService } from "../services/RepairService";
export declare class RepairController { export declare class RepairController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -21,7 +21,7 @@ export declare class RepairController {
protected repairHelper: RepairHelper; protected repairHelper: RepairHelper;
protected repairService: RepairService; protected repairService: RepairService;
protected repairConfig: IRepairConfig; protected repairConfig: IRepairConfig;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
/** /**
* Repair with trader * Repair with trader
* @param sessionID session id * @param sessionID session id

View File

@ -13,7 +13,7 @@ import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQ
import { ELocationName } from "../models/enums/ELocationName"; import { ELocationName } from "../models/enums/ELocationName";
import { IQuestConfig, 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService"; import { ItemFilterService } from "../services/ItemFilterService";
@ -63,13 +63,13 @@ export declare class RepeatableQuestController {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService; protected profileFixerService: ProfileFixerService;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected objectId: ObjectId; protected objectId: ObjectId;
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer); constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, 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.

View File

@ -6,15 +6,15 @@ import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRag
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { Upd } from "../models/eft/common/tables/IItem"; import { Upd } from "../models/eft/common/tables/IItem";
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData"; import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
declare class TradeController { declare class TradeController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected tradeHelper: TradeHelper; protected tradeHelper: TradeHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse; 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;
} }

View File

@ -1,3 +1,4 @@
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { TraderAssortHelper } from "../helpers/TraderAssortHelper"; import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -17,8 +18,9 @@ export declare class TraderController {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected traderAssortService: TraderAssortService; protected traderAssortService: TraderAssortService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, jsonUtil: JsonUtil); constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
/** /**
* Runs when onLoad event is fired * Runs when onLoad event is fired
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService * Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService

View File

@ -1,10 +1,10 @@
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { IPmcData } from "../models/eft/common/IPmcData"; 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 {
protected itemEvenRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
constructor(itemEvenRouter: ItemEventRouter); constructor(eventOutputHolder: EventOutputHolder);
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;
} }

View File

@ -0,0 +1,28 @@
import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService";
export declare class FenceBaseAssortGenerator {
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
protected itemHelper: ItemHelper;
protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
/**
* Create base fence assorts dynamically and store in db
*/
generateFenceBaseAssorts(): void;
/**
* Check if item is valid for being added to fence assorts
* @param item Item to check
* @returns true if valid fence item
*/
protected isValidFenceItem(item: ITemplateItem): boolean;
}

View File

@ -17,8 +17,8 @@ export declare class LootGenerator {
protected itemFilterService: ItemFilterService; protected itemFilterService: ItemFilterService;
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService); constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService);
/** /**
* Generate a list of items based on options passed in * Generate a list of items based on configuration options parameter
* @param options parameters to adjust what loot is generated * @param options parameters to adjust how loot is generated
* @returns An array of loot items * @returns An array of loot items
*/ */
createRandomloot(options: LootRequest): LootItem[]; createRandomloot(options: LootRequest): LootItem[];
@ -44,7 +44,13 @@ export declare class LootGenerator {
max: number; max: number;
}>, options: LootRequest, result: LootItem[]): boolean; }>, options: LootRequest, result: LootItem[]): boolean;
/** /**
* * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values
* @param item item to get stack count of
* @param options loot options
* @returns stack count
*/
protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number;
/**
* Find a random item in items.json and add to result array * Find a random item in items.json and add to result array
* @param globalDefaultPresets presets to choose from * @param globalDefaultPresets presets to choose from
* @param itemTypeCounts item limit counts * @param itemTypeCounts item limit counts

View File

@ -39,6 +39,13 @@ export declare class RagfairOfferGenerator {
protected ragfairConfig: IRagfairConfig; 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, ragfairCategoriesService: RagfairCategoriesService, 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, ragfairCategoriesService: RagfairCategoriesService, 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;
/**
* Get avatar url from trader table in db
* @param isTrader Is user we're getting avatar for a trader
* @param userId persons id to get avatar of
* @returns url of avatar
*/
protected getAvatarUrl(isTrader: boolean, userId: string): string;
/** /**
* Convert a count of currency into roubles * Convert a count of currency into roubles
* @param currencyCount amount of currency to convert into roubles * @param currencyCount amount of currency to convert into roubles

View File

@ -1,6 +1,7 @@
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile"; import { Dialogue, MessageContent, MessagePreview } from "../models/eft/profile/IAkiProfile";
import { MessageType } from "../models/enums/MessageType"; import { MessageType } from "../models/enums/MessageType";
import { ILogger } from "../models/spt/utils/ILogger";
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";
@ -8,13 +9,14 @@ 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 {
protected logger: ILogger;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper; protected notifierHelper: NotifierHelper;
protected notificationSendHelper: NotificationSendHelper; protected notificationSendHelper: NotificationSendHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper); constructor(logger: ILogger, 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;
/** /**
* Add a templated message to the dialogue. * Add a templated message to the dialogue.
@ -23,7 +25,7 @@ export declare class DialogueHelper {
* @param sessionID * @param sessionID
* @param rewards * @param rewards
*/ */
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: any[]): void; addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[]): void;
/** /**
* Get the preview contents of the last message in a dialogue. * Get the preview contents of the last message in a dialogue.
* @param dialogue * @param dialogue

View File

@ -1,3 +1,4 @@
import { DatabaseServer } from "../servers/DatabaseServer";
declare class LookupItem { declare class LookupItem {
byId: Record<number, string>; byId: Record<number, string>;
byParent: Record<string, string[]>; byParent: Record<string, string[]>;
@ -9,17 +10,35 @@ export declare class LookupCollection {
constructor(); constructor();
} }
export declare class HandbookHelper { export declare class HandbookHelper {
protected lookup: LookupCollection; protected databaseServer: DatabaseServer;
hydrateLookup(lookup: LookupCollection): void; protected handbookPriceCache: LookupCollection;
getTemplatePrice(x: string): number; constructor(databaseServer: DatabaseServer);
hydrateLookup(): void;
/**
* Get price from internal cache, if cache empty look up price directly in handbook (expensive)
* If no values found, return 1
* @param tpl item tpl to look up price for
* @returns price in roubles
*/
getTemplatePrice(tpl: string): number;
/**
* all items in template with the given parent category
* @param x
* @returns string array
*/
templatesWithParent(x: string): string[]; templatesWithParent(x: string): string[];
isCategory(x: string): boolean; /**
* Does category exist in handbook cache
* @param category
* @returns true if exists in cache
*/
isCategory(category: string): boolean;
childrenCategories(x: string): string[]; childrenCategories(x: string): string[];
/** /**
* Gets Currency to Ruble conversion Value * Convert currency into roubles
* @param {number} value * @param {number} value
* @param {string} currencyFrom * @param {string} currencyFrom
* @returns number * @returns get rouble value of inputted currency
*/ */
inRUB(value: number, currencyFrom: string): number; inRUB(value: number, currencyFrom: string): number;
/** /**

View File

@ -8,7 +8,7 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PlayerService } from "../services/PlayerService"; import { PlayerService } from "../services/PlayerService";
@ -24,7 +24,7 @@ export declare class HideoutHelper {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
@ -35,7 +35,7 @@ export declare class HideoutHelper {
static bitcoin: string; static bitcoin: string;
static expeditionaryFuelTank: string; static expeditionaryFuelTank: string;
protected hideoutConfig: IHideoutConfig; 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, eventOutputHolder: EventOutputHolder, 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;
/** /**
* This convinience function intialies new Production Object * This convinience function intialies new Production Object

View File

@ -1,10 +1,10 @@
import { INotification } from "../models/eft/notifier/INotifier"; import { INotification } from "../models/eft/notifier/INotifier";
import { HttpServer } from "../servers/HttpServer"; import { WebSocketServer } from "../servers/WebSocketServer";
import { NotificationService } from "../services/NotificationService"; import { NotificationService } from "../services/NotificationService";
export declare class NotificationSendHelper { export declare class NotificationSendHelper {
protected httpServer: HttpServer; protected webSocketServer: WebSocketServer;
protected notificationService: NotificationService; protected notificationService: NotificationService;
constructor(httpServer: HttpServer, notificationService: NotificationService); constructor(webSocketServer: WebSocketServer, notificationService: NotificationService);
/** /**
* Send notification message to the appropiate channel * Send notification message to the appropiate channel
*/ */

View File

@ -6,7 +6,7 @@ import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRe
import { QuestStatus } from "../models/enums/QuestStatus"; import { QuestStatus } from "../models/enums/QuestStatus";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { LocaleService } from "../services/LocaleService"; import { LocaleService } from "../services/LocaleService";
@ -25,7 +25,7 @@ export declare class QuestHelper {
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService; protected localeService: LocaleService;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
@ -35,7 +35,7 @@ export declare class QuestHelper {
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
/** /**
* Get status of a quest by quest id * Get status of a quest by quest id
* @param pmcData Profile to search * @param pmcData Profile to search

View File

@ -6,7 +6,7 @@ import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -27,7 +27,7 @@ export declare class RagfairOfferHelper {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected saveServer: SaveServer; protected saveServer: SaveServer;
@ -45,9 +45,15 @@ export declare class RagfairOfferHelper {
protected static goodSoldTemplate: string; protected static goodSoldTemplate: string;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected questConfig: IQuestConfig; protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, 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[];
/**
* Check if trader offers' BuyRestrictionMax value has been reached
* @param offer offer to check restriction properties of
* @returns true if restriction reached, false if no restrictions/not reached
*/
protected traderBuyRestrictionReached(offer: IRagfairOffer): boolean;
/** /**
* Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level * Get an array of flea offers that are inaccessible to player due to their inadequate loyalty level
* @param offers Offers to check * @param offers Offers to check

View File

@ -7,20 +7,20 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
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";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { RagfairServer } from "../servers/RagfairServer"; 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 {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected ragfairServer: RagfairServer; protected ragfairServer: RagfairServer;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer);
/** /**
* Buy item from flea or trader * Buy item from flea or trader
* @param pmcData * @param pmcData

View File

@ -1,4 +1,5 @@
import { QuestRewardType } from "../../../enums/QuestRewardType"; import { QuestRewardType } from "../../../enums/QuestRewardType";
import { QuestStatus } from "../../../enums/QuestStatus";
import { Item } from "./IItem"; import { Item } from "./IItem";
export interface IQuest { export interface IQuest {
QuestName: string; QuestName: string;
@ -47,7 +48,7 @@ export interface AvailableForProps {
compareMethod?: string; compareMethod?: string;
visibilityConditions?: VisibilityCondition[]; visibilityConditions?: VisibilityCondition[];
target?: string | string[]; target?: string | string[];
status?: number[]; status?: QuestStatus[];
onlyFoundInRaid?: boolean; onlyFoundInRaid?: boolean;
oneSessionOnly?: boolean; oneSessionOnly?: boolean;
doNotResetIfCounterCompleted?: boolean; doNotResetIfCounterCompleted?: boolean;
@ -99,7 +100,7 @@ export interface Rewards {
FailRestartable: Reward[]; FailRestartable: Reward[];
Expired: Reward[]; Expired: Reward[];
} }
export interface Reward { export interface Reward extends Item {
value?: string | number; value?: string | number;
id: string; id: string;
type: QuestRewardType; type: QuestRewardType;

View File

@ -2,7 +2,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
export interface IGetFriendListDataResponse { export interface IGetFriendListDataResponse {
Friends: Friend[]; Friends: Friend[];
Ignore: any[]; Ignore: any[];
InIgnoreList: any[]; InIgnoreList: string[];
} }
export interface Friend { export interface Friend {
_id: string; _id: string;

View File

@ -0,0 +1,4 @@
export interface ICheckVersionResponse {
isvalid: boolean;
latestVersion: string;
}

View File

@ -0,0 +1,4 @@
export interface IServerDetails {
ip: string;
port: number;
}

View File

@ -4,6 +4,7 @@ export interface GetProfileStatusResponseData {
} }
export interface ProfileData { export interface ProfileData {
profileid: string; profileid: string;
profileToken: string;
status: string; status: string;
sid: string; sid: string;
ip: string; ip: string;

View File

@ -37,12 +37,12 @@ export interface Dialogue {
attachmentsNew: number; attachmentsNew: number;
} }
export interface DialogueInfo { export interface DialogueInfo {
_id: string;
type: MessageType;
message: MessagePreview;
pinned: boolean;
new: number;
attachmentsNew: number; attachmentsNew: number;
new: number;
type: MessageType;
pinned: boolean;
message: MessagePreview;
_id: string;
} }
export interface Message { export interface Message {
_id: string; _id: string;

View File

@ -1,6 +1,9 @@
export declare enum BaseClasses { export declare enum BaseClasses {
WEAPON = "5422acb9af1c889c16000029", WEAPON = "5422acb9af1c889c16000029",
ARMOR = "5448e54d4bdc2dcc718b4568", ARMOR = "5448e54d4bdc2dcc718b4568",
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
HEADWEAR = "5a341c4086f77401f2541505",
FACECOVER = "5a341c4686f77469e155819e",
VEST = "5448e5284bdc2dcb718b4567", VEST = "5448e5284bdc2dcb718b4567",
BACKPACK = "5448e53e4bdc2d60728b4567", BACKPACK = "5448e53e4bdc2d60728b4567",
VISORS = "5448e5724bdc2ddf718b4568", VISORS = "5448e5724bdc2ddf718b4568",

View File

@ -25,6 +25,6 @@ export interface AirdropLoot {
itemTypeWhitelist: string[]; itemTypeWhitelist: string[];
/** key: item base type: value: max count */ /** key: item base type: value: max count */
itemLimits: Record<string, number>; itemLimits: Record<string, number>;
itemStackLimits: Record<string, MinMax>;
armorLevelWhitelist: number[]; armorLevelWhitelist: number[];
moneyStackLimits: Record<string, MinMax>;
} }

View File

@ -17,5 +17,8 @@ export interface FenceConfig {
assortSize: number; assortSize: number;
maxPresetsPercent: number; maxPresetsPercent: number;
presetPriceMult: number; presetPriceMult: number;
itemPriceMult: number;
regenerateAssortsOnRefresh: boolean;
itemTypeLimits: Record<string, number>;
blacklist: string[]; blacklist: string[];
} }

View File

@ -6,6 +6,6 @@ export declare class LootRequest {
itemTypeWhitelist: string[]; itemTypeWhitelist: string[];
/** key: item base type: value: max count */ /** key: item base type: value: max count */
itemLimits: Record<string, number>; itemLimits: Record<string, number>;
itemStackLimits: Record<string, MinMax>;
armorLevelWhitelist: number[]; armorLevelWhitelist: number[];
moneyStackLimits: Record<string, MinMax>;
} }

View File

@ -0,0 +1,11 @@
import { JsonUtil } from "../utils/JsonUtil";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class EventOutputHolder {
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper;
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper);
protected output: IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse;
resetOutput(sessionID: string): void;
}

View File

@ -1,17 +1,14 @@
import { JsonUtil } from "../utils/JsonUtil";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest"; import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { ItemEventRouterDefinition } from "../di/Router"; import { ItemEventRouterDefinition } from "../di/Router";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "./EventOutputHolder";
export declare class ItemEventRouter { export declare class ItemEventRouter {
protected logger: ILogger; protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouters: ItemEventRouterDefinition[]; protected itemEventRouters: ItemEventRouterDefinition[];
constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[]); protected eventOutputHolder: EventOutputHolder;
protected output: IItemEventRouterResponse; constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], eventOutputHolder: EventOutputHolder);
handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse;
protected resetOutput(sessionID: string): void;
} }

View File

@ -1,34 +1,24 @@
/// <reference types="node" /> /// <reference types="node" />
import http, { IncomingMessage, ServerResponse } from "http"; import http, { IncomingMessage, ServerResponse } from "http";
import WebSocket from "ws";
import { ApplicationContext } from "../context/ApplicationContext"; import { ApplicationContext } from "../context/ApplicationContext";
import { HttpServerHelper } from "../helpers/HttpServerHelper"; import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { NotifierHelper } from "../helpers/NotifierHelper";
import { INotification } from "../models/eft/notifier/INotifier";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
import { ConfigServer } from "./ConfigServer"; import { ConfigServer } from "./ConfigServer";
import { DatabaseServer } from "./DatabaseServer"; import { DatabaseServer } from "./DatabaseServer";
import { IHttpListener } from "./http/IHttpListener"; import { IHttpListener } from "./http/IHttpListener";
import { WebSocketServer } from "./WebSocketServer";
export declare class HttpServer { export declare class HttpServer {
protected logger: ILogger; protected logger: ILogger;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected notifierHelper: NotifierHelper;
protected httpServerHelper: HttpServerHelper; protected httpServerHelper: HttpServerHelper;
protected httpListeners: IHttpListener[]; protected httpListeners: IHttpListener[];
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected applicationContext: ApplicationContext; protected applicationContext: ApplicationContext;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, httpServerHelper: HttpServerHelper, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext); protected webSocketServer: WebSocketServer;
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
protected webSockets: {};
protected websocketPingHandler: any;
getCookies(req: http.IncomingMessage): any; getCookies(req: http.IncomingMessage): any;
sendMessage(sessionID: string, output: INotification): void;
isConnectionWebSocket(sessionID: string): boolean;
handleRequest(req: IncomingMessage, resp: ServerResponse): void; handleRequest(req: IncomingMessage, resp: ServerResponse): void;
load(): void; load(): void;
protected getRandomisedMessage(): string;
protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void;
} }

View File

@ -0,0 +1,25 @@
/// <reference types="node" />
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import WebSocket from "ws";
import http, { IncomingMessage } from "http";
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
import { INotification } from "../models/eft/notifier/INotifier";
import { ConfigServer } from "./ConfigServer";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
export declare class WebSocketServer {
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected configServer: ConfigServer;
protected httpServerHelper: HttpServerHelper;
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, httpServerHelper: HttpServerHelper);
protected httpConfig: IHttpConfig;
protected defaultNotification: INotification;
protected webSockets: Record<string, WebSocket.WebSocket>;
protected websocketPingHandler: any;
setupWebSocket(httpServer: http.Server): void;
sendMessage(sessionID: string, output: INotification): void;
protected getRandomisedMessage(): string;
isConnectionWebSocket(sessionID: string): boolean;
protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void;
}

View File

@ -3,6 +3,8 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper"; import { PresetHelper } from "../helpers/PresetHelper";
import { FenceLevel } from "../models/eft/common/IGlobals"; import { FenceLevel } from "../models/eft/common/IGlobals";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ITraderAssort } from "../models/eft/common/tables/ITrader"; import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { ITraderConfig } from "../models/spt/config/ITraderConfig"; import { ITraderConfig } from "../models/spt/config/ITraderConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -41,6 +43,13 @@ export declare class FenceService {
* @returns ITraderAssort * @returns ITraderAssort
*/ */
getFenceAssorts(pmcProfile: IPmcData): ITraderAssort; getFenceAssorts(pmcProfile: IPmcData): ITraderAssort;
/**
* Adjust assorts price by a modifier
* @param item
* @param assort
* @param modifier
*/
protected adjustItemPriceByModifier(item: Item, assort: ITraderAssort, modifier: number): void;
/** /**
* Get fence assorts with no price adjustments based on fence rep * Get fence assorts with no price adjustments based on fence rep
* @returns ITraderAssort * @returns ITraderAssort
@ -96,6 +105,21 @@ export declare class FenceService {
* @param assorts object to add assorts to * @param assorts object to add assorts to
*/ */
protected createAssorts(assortCount: number, assorts: ITraderAssort): void; protected createAssorts(assortCount: number, assorts: ITraderAssort): void;
/**
* Randomise items' upd properties e.g. med packs/weapons/armor
* @param itemDetails Item being randomised
* @param itemToAdjust Item being edited
*/
protected randomiseItemUpdProperties(itemDetails: ITemplateItem, itemToAdjust: Item): void;
/**
* Construct item limit record to hold max and current item count
* @param limits limits as defined in config
* @returns record, key: item tplId, value: current/max item count allowed
*/
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
current: number;
max: number;
}>;
/** /**
* Get the next update timestamp for fence * Get the next update timestamp for fence
* @returns future timestamp * @returns future timestamp

View File

@ -2,7 +2,7 @@ import { IItemConfig } from "../models/spt/config/IItemConfig";
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";
/** Centralise the handling of blacklisting items, uses blacklist found in config/item.json */ /** Centralise the handling of blacklisting items, uses blacklist found in config/item.json, stores items that should not be used by players / broken items */
export declare class ItemFilterService { export declare class ItemFilterService {
protected logger: ILogger; protected logger: ILogger;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;

View File

@ -5,7 +5,7 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; 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 { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -20,14 +20,14 @@ export declare class RagfairOfferService {
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected ragfairCategoriesService: RagfairCategoriesService; protected ragfairCategoriesService: RagfairCategoriesService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected playerOffersLoaded: boolean; protected playerOffersLoaded: boolean;
protected expiredOffers: Item[]; protected expiredOffers: Item[];
protected offers: IRagfairOffer[]; protected offers: IRagfairOffer[];
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, configServer: ConfigServer);
/** /**
* Get all offers * Get all offers
* @returns IRagfairOffer array * @returns IRagfairOffer array

View File

@ -10,7 +10,8 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
export declare class RagfairPriceService { import { OnLoad } from "../di/OnLoad";
export declare class RagfairPriceService implements OnLoad {
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected logger: ILogger; protected logger: ILogger;
@ -19,21 +20,38 @@ export declare class RagfairPriceService {
protected randomUtil: RandomUtil; protected randomUtil: RandomUtil;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
protected generatedDynamicPrices: boolean;
protected generatedStaticPrices: boolean;
protected prices: IRagfairServerPrices; protected prices: IRagfairServerPrices;
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer); constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer);
onLoad(): void;
getRoute(): string;
/**
* Iterate over all items of type "Item" in db and get template price, store in cache
*/
generateStaticPrices(): void; generateStaticPrices(): void;
generateDynamicPrices(): void; protected generateDynamicPrices(): void;
hasDynamicPrices(): boolean; /**
getDynamicPrice(itemTpl: string): number; * Get the dynamic price for an item. If value doesn't exist, use static (handbook0) value.
getAllFleaPrices(): Record<string, number>; * if no static value, return 1
* @param tplId Item tpl id to get price for
* @returns price in roubles
*/
getFleaPriceForItem(tplId: string): number; getFleaPriceForItem(tplId: string): number;
/** /**
* Check to see if an items price is below its handbook price and adjust accoring to values set to config/ragfair.json * get the dynamic (flea) price for an item
* @param itemPrice price of item * Grabs prices from prices.json and stores in class if none currently exist
* @param itemTpl item template Id being checked * @param itemTpl item template id to look up
* @returns adjusted price value in roubles * @returns price in roubles
*/ */
protected adjustPriceIfBelowHandbook(itemPrice: number, itemTpl: string): number; getDynamicPriceForItem(itemTpl: string): number;
/**
* Grab the static (handbook) for an item by its tplId
* @param itemTpl item template id to look up
* @returns price in roubles
*/
getStaticPriceForItem(itemTpl: string): number;
getAllFleaPrices(): Record<string, number>;
/** /**
* Get the percentage difference between two values * Get the percentage difference between two values
* @param a numerical value a * @param a numerical value a
@ -41,9 +59,15 @@ export declare class RagfairPriceService {
* @returns different in percent * @returns different in percent
*/ */
protected getPriceDifference(a: number, b: number): number; protected getPriceDifference(a: number, b: number): number;
getStaticPriceForItem(tplId: string): number;
getBarterPrice(barterScheme: IBarterScheme[]): number; getBarterPrice(barterScheme: IBarterScheme[]): number;
getDynamicOfferPrice(items: Item[], desiredCurrency: string): number; getDynamicOfferPrice(items: Item[], desiredCurrency: string): number;
/**
* Check to see if an items price is below its handbook price and adjust accoring to values set to config/ragfair.json
* @param itemPrice price of item
* @param itemTpl item template Id being checked
* @returns adjusted price value in roubles
*/
protected adjustPriceIfBelowHandbook(itemPrice: number, itemTpl: string): number;
/** /**
* Multiply the price by a randomised curve where n = 2, shift = 2 * Multiply the price by a randomised curve where n = 2, shift = 2
* @param existingPrice price to alter * @param existingPrice price to alter
@ -58,7 +82,7 @@ export declare class RagfairPriceService {
* @param existingPrice price of existing base weapon * @param existingPrice price of existing base weapon
* @returns * @returns
*/ */
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; protected getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
/** /**
* Attempt to get the default preset for a weapon, failing that get the first preset in the array * Attempt to get the default preset for a weapon, failing that get the first preset in the array
* (assumes default = has encyclopedia entry) * (assumes default = has encyclopedia entry)

View File

@ -9,13 +9,11 @@ import { RepairKitsInfo } from "../models/eft/repair/IRepairActionDataRequest";
import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest"; import { RepairItem } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IRepairConfig } from "../models/spt/config/IRepairConfig"; import { 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 { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { PaymentService } from "./PaymentService"; import { PaymentService } from "./PaymentService";
export declare class RepairService { export declare class RepairService {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
@ -23,7 +21,7 @@ export declare class RepairService {
protected repairHelper: RepairHelper; protected repairHelper: RepairHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
repairConfig: IRepairConfig; repairConfig: IRepairConfig;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
/** /**
* Use trader to repair an items durability * Use trader to repair an items durability
* @param sessionID Session id * @param sessionID Session id

View File

@ -1,6 +1,7 @@
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGlobals } from "../models/eft/common/IGlobals"; import { IGlobals } from "../models/eft/common/IGlobals";
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem"; import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
import { IQuest } from "../models/eft/common/tables/IQuest"; import { IQuest } from "../models/eft/common/tables/IQuest";
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea"; import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction"; import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
@ -18,7 +19,7 @@ export declare class DataCallbacks {
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>;
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>; getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>; getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>; getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;

View File

@ -1,8 +1,10 @@
import { GameController } from "../controllers/GameController"; import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData"; import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -17,8 +19,8 @@ declare class GameCallbacks {
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>; getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData; reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;

View File

@ -5,16 +5,16 @@ import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothin
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData"; import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
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 {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, 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;

View File

@ -3,7 +3,9 @@ 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 { Config } from "../models/eft/common/IGlobals"; import { Config } from "../models/eft/common/IGlobals";
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile"; import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig"; import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
@ -37,6 +39,6 @@ export declare class GameController {
protected adjustLabsRaiderSpawnRate(): void; protected adjustLabsRaiderSpawnRate(): void;
protected logProfileDetails(fullProfile: IAkiProfile): void; protected logProfileDetails(fullProfile: IAkiProfile): void;
getGameConfig(sessionID: string): IGameConfigResponse; getGameConfig(sessionID: string): IGameConfigResponse;
getServer(): any[]; getServer(): IServerDetails[];
getValidGameVersion(): any; getValidGameVersion(): ICheckVersionResponse;
} }

View File

@ -8,16 +8,16 @@ import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestD
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData"; import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData"; import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthController { export declare class HealthController {
protected logger: ILogger; protected logger: ILogger;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected paymentService: PaymentService; protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
/** /**
* stores in-raid player health * stores in-raid player health
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -19,7 +19,7 @@ import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgrad
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig"; import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer"; import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
@ -40,7 +40,7 @@ export declare class HideoutController {
protected playerService: PlayerService; protected playerService: PlayerService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected hideoutHelper: HideoutHelper; protected hideoutHelper: HideoutHelper;
@ -49,7 +49,7 @@ export declare class HideoutController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected static nameBackendCountersCrafting: string; protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
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;
/** /**

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