Update types to match server

This commit is contained in:
Dev 2023-06-06 16:37:29 +01:00
parent 9106d2f98b
commit 7dab084b7c
45 changed files with 290 additions and 55 deletions

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/**
* Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for
* @param sessionID Session id
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[]; getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/** /**
* Has an outfit been purchased by a player * Has an outfit been purchased by a player
* @param suitId clothing id * @param suitId clothing id
* @param sessionID Session id * @param sessionID Session id
* @returns true/false * @returns true if purchased already
*/ */
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/** /**

View File

@ -176,7 +176,7 @@ export declare class HideoutController {
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile * @param pmcData Player profile
* @param request Start production request * @param request Start production request
* @param sessionID Session id * @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper"; import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper"; import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService"; import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService"; import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid * @param offraidData post-raid data of raid
*/ */
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
protected sendLostInsuranceMessage(sessionID: string): void;
/** /**
* Is the player dead after a raid - dead is anything other than "survived" / "runner" * Is the player dead after a raid - dead is anything other than "survived" / "runner"
* @param statusOnExit exit value from offraidData object * @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
/**
* Create basic message context template
* @param templateId
* @param messageType
* @param maxStoreTime
* @returns
*/
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.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to
* @param body Production request
* @param sessionID Session id
* @returns client response
*/
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* This convenience function initializes new Production Object * This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id * @param sessionID Session id
*/ */
updatePlayerHideout(sessionID: string): void; updatePlayerHideout(sessionID: string): void;
/**
* Get various properties that will be passed to hideout update-related functions
* @param pmcData Player profile
* @returns Properties
*/
protected getHideoutProperties(pmcData: IPmcData): {
btcFarmCGs: number;
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
};
/** /**
* Update progress timer for water collector * Update progress timer for water collector
* @param pmcData profile to update * @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/ */
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number; protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
/** /**
* Determine if the offer being listed will be sold * Get array of item count and sell time (empty array = no sell)
* @param sellChancePercent chance item will sell * @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell * @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed * @returns Array of purchases of item(s) listed

View File

@ -377,7 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings; RandomLootSettings?: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper"; import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService { export declare class InsuranceService {
protected logger: ILogger; protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>; protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean; insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>; getInsurance(sessionId: string): Record<string, Item[]>;
@ -50,6 +54,11 @@ export declare class InsuranceService {
* @param mapId Id of the map player died/exited that caused the insurance to be issued on * @param mapId Id of the map player died/exited that caused the insurance to be issued on
*/ */
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
/**
* Send a message to player informing them gear was lost
* @param sessionID Session id
*/
sendLostInsuranceMessage(sessionID: string): void;
protected removeLocationProperty(sessionId: string, traderId: string): void; protected removeLocationProperty(sessionId: string, traderId: string): void;
/** /**
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure

View File

@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/ */
hydrateItemBaseClassCache(): void; hydrateItemBaseClassCache(): void;
/** /**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/**
* Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for
* @param sessionID Session id
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[]; getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/** /**
* Has an outfit been purchased by a player * Has an outfit been purchased by a player
* @param suitId clothing id * @param suitId clothing id
* @param sessionID Session id * @param sessionID Session id
* @returns true/false * @returns true if purchased already
*/ */
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/** /**

View File

@ -176,7 +176,7 @@ export declare class HideoutController {
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile * @param pmcData Player profile
* @param request Start production request * @param request Start production request
* @param sessionID Session id * @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper"; import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper"; import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService"; import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService"; import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid * @param offraidData post-raid data of raid
*/ */
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
protected sendLostInsuranceMessage(sessionID: string): void;
/** /**
* Is the player dead after a raid - dead is anything other than "survived" / "runner" * Is the player dead after a raid - dead is anything other than "survived" / "runner"
* @param statusOnExit exit value from offraidData object * @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
/**
* Create basic message context template
* @param templateId
* @param messageType
* @param maxStoreTime
* @returns
*/
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.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to
* @param body Production request
* @param sessionID Session id
* @returns client response
*/
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* This convenience function initializes new Production Object * This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id * @param sessionID Session id
*/ */
updatePlayerHideout(sessionID: string): void; updatePlayerHideout(sessionID: string): void;
/**
* Get various properties that will be passed to hideout update-related functions
* @param pmcData Player profile
* @returns Properties
*/
protected getHideoutProperties(pmcData: IPmcData): {
btcFarmCGs: number;
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
};
/** /**
* Update progress timer for water collector * Update progress timer for water collector
* @param pmcData profile to update * @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/ */
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number; protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
/** /**
* Determine if the offer being listed will be sold * Get array of item count and sell time (empty array = no sell)
* @param sellChancePercent chance item will sell * @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell * @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed * @returns Array of purchases of item(s) listed

View File

@ -377,7 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings; RandomLootSettings?: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper"; import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService { export declare class InsuranceService {
protected logger: ILogger; protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>; protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean; insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>; getInsurance(sessionId: string): Record<string, Item[]>;
@ -50,6 +54,11 @@ export declare class InsuranceService {
* @param mapId Id of the map player died/exited that caused the insurance to be issued on * @param mapId Id of the map player died/exited that caused the insurance to be issued on
*/ */
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
/**
* Send a message to player informing them gear was lost
* @param sessionID Session id
*/
sendLostInsuranceMessage(sessionID: string): void;
protected removeLocationProperty(sessionId: string, traderId: string): void; protected removeLocationProperty(sessionId: string, traderId: string): void;
/** /**
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure

View File

@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/ */
hydrateItemBaseClassCache(): void; hydrateItemBaseClassCache(): void;
/** /**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/**
* Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for
* @param sessionID Session id
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[]; getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/** /**
* Has an outfit been purchased by a player * Has an outfit been purchased by a player
* @param suitId clothing id * @param suitId clothing id
* @param sessionID Session id * @param sessionID Session id
* @returns true/false * @returns true if purchased already
*/ */
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/** /**

View File

@ -176,7 +176,7 @@ export declare class HideoutController {
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile * @param pmcData Player profile
* @param request Start production request * @param request Start production request
* @param sessionID Session id * @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper"; import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper"; import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService"; import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService"; import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid * @param offraidData post-raid data of raid
*/ */
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
protected sendLostInsuranceMessage(sessionID: string): void;
/** /**
* Is the player dead after a raid - dead is anything other than "survived" / "runner" * Is the player dead after a raid - dead is anything other than "survived" / "runner"
* @param statusOnExit exit value from offraidData object * @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
/**
* Create basic message context template
* @param templateId
* @param messageType
* @param maxStoreTime
* @returns
*/
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.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to
* @param body Production request
* @param sessionID Session id
* @returns client response
*/
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* This convenience function initializes new Production Object * This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id * @param sessionID Session id
*/ */
updatePlayerHideout(sessionID: string): void; updatePlayerHideout(sessionID: string): void;
/**
* Get various properties that will be passed to hideout update-related functions
* @param pmcData Player profile
* @returns Properties
*/
protected getHideoutProperties(pmcData: IPmcData): {
btcFarmCGs: number;
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
};
/** /**
* Update progress timer for water collector * Update progress timer for water collector
* @param pmcData profile to update * @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/ */
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number; protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
/** /**
* Determine if the offer being listed will be sold * Get array of item count and sell time (empty array = no sell)
* @param sellChancePercent chance item will sell * @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell * @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed * @returns Array of purchases of item(s) listed

View File

@ -377,7 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings; RandomLootSettings?: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper"; import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService { export declare class InsuranceService {
protected logger: ILogger; protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>; protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean; insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>; getInsurance(sessionId: string): Record<string, Item[]>;
@ -50,6 +54,11 @@ export declare class InsuranceService {
* @param mapId Id of the map player died/exited that caused the insurance to be issued on * @param mapId Id of the map player died/exited that caused the insurance to be issued on
*/ */
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
/**
* Send a message to player informing them gear was lost
* @param sessionID Session id
*/
sendLostInsuranceMessage(sessionID: string): void;
protected removeLocationProperty(sessionId: string, traderId: string): void; protected removeLocationProperty(sessionId: string, traderId: string): void;
/** /**
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure

View File

@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/ */
hydrateItemBaseClassCache(): void; hydrateItemBaseClassCache(): void;
/** /**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/**
* Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for
* @param sessionID Session id
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[]; getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/** /**
* Has an outfit been purchased by a player * Has an outfit been purchased by a player
* @param suitId clothing id * @param suitId clothing id
* @param sessionID Session id * @param sessionID Session id
* @returns true/false * @returns true if purchased already
*/ */
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/** /**

View File

@ -176,7 +176,7 @@ export declare class HideoutController {
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile * @param pmcData Player profile
* @param request Start production request * @param request Start production request
* @param sessionID Session id * @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper"; import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper"; import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService"; import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService"; import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid * @param offraidData post-raid data of raid
*/ */
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
protected sendLostInsuranceMessage(sessionID: string): void;
/** /**
* Is the player dead after a raid - dead is anything other than "survived" / "runner" * Is the player dead after a raid - dead is anything other than "survived" / "runner"
* @param statusOnExit exit value from offraidData object * @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
/**
* Create basic message context template
* @param templateId
* @param messageType
* @param maxStoreTime
* @returns
*/
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.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to
* @param body Production request
* @param sessionID Session id
* @returns client response
*/
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* This convenience function initializes new Production Object * This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id * @param sessionID Session id
*/ */
updatePlayerHideout(sessionID: string): void; updatePlayerHideout(sessionID: string): void;
/**
* Get various properties that will be passed to hideout update-related functions
* @param pmcData Player profile
* @returns Properties
*/
protected getHideoutProperties(pmcData: IPmcData): {
btcFarmCGs: number;
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
};
/** /**
* Update progress timer for water collector * Update progress timer for water collector
* @param pmcData profile to update * @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/ */
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number; protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
/** /**
* Determine if the offer being listed will be sold * Get array of item count and sell time (empty array = no sell)
* @param sellChancePercent chance item will sell * @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell * @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed * @returns Array of purchases of item(s) listed

View File

@ -377,7 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings; RandomLootSettings?: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper"; import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService { export declare class InsuranceService {
protected logger: ILogger; protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>; protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean; insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>; getInsurance(sessionId: string): Record<string, Item[]>;
@ -50,6 +54,11 @@ export declare class InsuranceService {
* @param mapId Id of the map player died/exited that caused the insurance to be issued on * @param mapId Id of the map player died/exited that caused the insurance to be issued on
*/ */
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
/**
* Send a message to player informing them gear was lost
* @param sessionID Session id
*/
sendLostInsuranceMessage(sessionID: string): void;
protected removeLocationProperty(sessionId: string, traderId: string): void; protected removeLocationProperty(sessionId: string, traderId: string): void;
/** /**
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure

View File

@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/ */
hydrateItemBaseClassCache(): void; hydrateItemBaseClassCache(): void;
/** /**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper); constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
/**
* Get purchasable clothing items from trader that match players side (usec/bear)
* @param traderID trader to look up clothing for
* @param sessionID Session id
* @returns ISuit array
*/
getTraderSuits(traderID: string, sessionID: string): ISuit[]; getTraderSuits(traderID: string, sessionID: string): ISuit[];
/** Equip one to many clothing items to player */
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Purchase/unlock a clothing item from a trader
* @param pmcData Player profile
* @param buyClothingRequest Request object
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse; buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit; protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/** /**
* Has an outfit been purchased by a player * Has an outfit been purchased by a player
* @param suitId clothing id * @param suitId clothing id
* @param sessionID Session id * @param sessionID Session id
* @returns true/false * @returns true if purchased already
*/ */
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean; protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
/** /**

View File

@ -176,7 +176,7 @@ export declare class HideoutController {
*/ */
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse; protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/** /**
* Start area production for item * Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile * @param pmcData Player profile
* @param request Start production request * @param request Start production request
* @param sessionID Session id * @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper"; import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper"; import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper"; import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper"; import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService"; import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService"; import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService; protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService; protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper; protected questHelper: QuestHelper;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator; protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper; protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper; protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService; protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig; protected airdropConfig: IAirdropConfig;
protected inraidConfig: IInRaidConfig; protected inraidConfig: IInRaidConfig;
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer); constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
/** /**
* Save locationId to active profiles inraid object AND app context * Save locationId to active profiles inraid object AND app context
* @param sessionID Session id * @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid * @param offraidData post-raid data of raid
*/ */
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void; protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
protected sendLostInsuranceMessage(sessionID: string): void;
/** /**
* Is the player dead after a raid - dead is anything other than "survived" / "runner" * Is the player dead after a raid - dead is anything other than "survived" / "runner"
* @param statusOnExit exit value from offraidData object * @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper); constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
/**
* Create basic message context template
* @param templateId
* @param messageType
* @param maxStoreTime
* @returns
*/
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.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number; static maxSkillPoint: number;
protected hideoutConfig: IHideoutConfig; protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add production to profiles' Hideout.Production array
* @param pmcData Profile to add production to
* @param body Production request
* @param sessionID Session id
* @returns client response
*/
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse; registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* This convenience function initializes new Production Object * This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id * @param sessionID Session id
*/ */
updatePlayerHideout(sessionID: string): void; updatePlayerHideout(sessionID: string): void;
/**
* Get various properties that will be passed to hideout update-related functions
* @param pmcData Player profile
* @returns Properties
*/
protected getHideoutProperties(pmcData: IPmcData): {
btcFarmCGs: number;
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
};
/** /**
* Update progress timer for water collector * Update progress timer for water collector
* @param pmcData profile to update * @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/ */
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number; protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
/** /**
* Determine if the offer being listed will be sold * Get array of item count and sell time (empty array = no sell)
* @param sellChancePercent chance item will sell * @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell * @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed * @returns Array of purchases of item(s) listed

View File

@ -377,7 +377,7 @@ export interface Props {
ExplosionEffectType?: string; ExplosionEffectType?: string;
LinkedWeapon?: string; LinkedWeapon?: string;
UseAmmoWithoutShell?: boolean; UseAmmoWithoutShell?: boolean;
RandomLootSettings: IRandomLootSettings; RandomLootSettings?: IRandomLootSettings;
} }
export interface IHealthEffect { export interface IHealthEffect {
type: string; type: string;

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader"; import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper"; import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper"; import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper"; import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService"; import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService { export declare class InsuranceService {
protected logger: ILogger; protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper; protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper; protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService; protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>; protected insured: Record<string, Record<string, Item[]>>;
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer); constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
insuranceExists(sessionId: string): boolean; insuranceExists(sessionId: string): boolean;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean; insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
getInsurance(sessionId: string): Record<string, Item[]>; getInsurance(sessionId: string): Record<string, Item[]>;
@ -50,6 +54,11 @@ export declare class InsuranceService {
* @param mapId Id of the map player died/exited that caused the insurance to be issued on * @param mapId Id of the map player died/exited that caused the insurance to be issued on
*/ */
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void; sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
/**
* Send a message to player informing them gear was lost
* @param sessionID Session id
*/
sendLostInsuranceMessage(sessionID: string): void;
protected removeLocationProperty(sessionId: string, traderId: string): void; protected removeLocationProperty(sessionId: string, traderId: string): void;
/** /**
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure * Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure

View File

@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
/** /**
* Create cache and store inside ItemBaseClassService * Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/ */
hydrateItemBaseClassCache(): void; hydrateItemBaseClassCache(): void;
/** /**