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 localisationService: LocalisationService;
protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
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[];
/** Equip one to many clothing items to player */
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;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true/false
* @returns true if purchased already
*/
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;
/**
* Start area production for item
* Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
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
* @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid
*/
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"
* @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService;
protected 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;
/**
* Add a templated message to the dialogue.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number;
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);
/**
* 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;
/**
* This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id
*/
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
* @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/
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 itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed

View File

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

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
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;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
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
*/
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;
/**
* 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);
/**
* Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/
hydrateItemBaseClassCache(): void;
/**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer;
protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
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[];
/** Equip one to many clothing items to player */
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;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true/false
* @returns true if purchased already
*/
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;
/**
* Start area production for item
* Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
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
* @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid
*/
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"
* @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService;
protected 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;
/**
* Add a templated message to the dialogue.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number;
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);
/**
* 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;
/**
* This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id
*/
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
* @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/
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 itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed

View File

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

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
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;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
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
*/
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;
/**
* 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);
/**
* Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/
hydrateItemBaseClassCache(): void;
/**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer;
protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
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[];
/** Equip one to many clothing items to player */
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;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true/false
* @returns true if purchased already
*/
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;
/**
* Start area production for item
* Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
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
* @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid
*/
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"
* @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService;
protected 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;
/**
* Add a templated message to the dialogue.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number;
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);
/**
* 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;
/**
* This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id
*/
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
* @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/
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 itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed

View File

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

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
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;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
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
*/
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;
/**
* 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);
/**
* Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/
hydrateItemBaseClassCache(): void;
/**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer;
protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
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[];
/** Equip one to many clothing items to player */
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;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true/false
* @returns true if purchased already
*/
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;
/**
* Start area production for item
* Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
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
* @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid
*/
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"
* @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService;
protected 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;
/**
* Add a templated message to the dialogue.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number;
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);
/**
* 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;
/**
* This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id
*/
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
* @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/
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 itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed

View File

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

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
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;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
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
*/
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;
/**
* 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);
/**
* Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/
hydrateItemBaseClassCache(): void;
/**

View File

@ -16,16 +16,34 @@ export declare class CustomizationController {
protected saveServer: SaveServer;
protected localisationService: LocalisationService;
protected profileHelper: ProfileHelper;
protected readonly clothingIds: {
lowerParentId: string;
upperParentId: string;
};
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[];
/** Equip one to many clothing items to player */
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;
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
/**
* Has an outfit been purchased by a player
* @param suitId clothing id
* @param sessionID Session id
* @returns true/false
* @returns true if purchased already
*/
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;
/**
* Start area production for item
* Start area production for item by adding production to profiles' Hideout.Production array
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id

View File

@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
import { HealthHelper } from "../helpers/HealthHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { QuestHelper } from "../helpers/QuestHelper";
import { TraderHelper } from "../helpers/TraderHelper";
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { InsuranceService } from "../services/InsuranceService";
import { LocaleService } from "../services/LocaleService";
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
import { PmcChatResponseService } from "../services/PmcChatResponseService";
import { JsonUtil } from "../utils/JsonUtil";
@ -32,14 +30,12 @@ export declare class InraidController {
protected jsonUtil: JsonUtil;
protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer;
protected localeService: LocaleService;
protected pmcChatResponseService: PmcChatResponseService;
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
protected questHelper: QuestHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected playerScavGenerator: PlayerScavGenerator;
protected notificationSendHelper: NotificationSendHelper;
protected healthHelper: HealthHelper;
protected traderHelper: TraderHelper;
protected insuranceService: InsuranceService;
@ -48,7 +44,7 @@ export declare class InraidController {
protected configServer: ConfigServer;
protected airdropConfig: IAirdropConfig;
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
* @param sessionID Session id
@ -97,7 +93,6 @@ export declare class InraidController {
* @param offraidData post-raid data of raid
*/
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"
* @param statusOnExit exit value from offraidData object

View File

@ -19,6 +19,13 @@ export declare class DialogueHelper {
protected localisationService: LocalisationService;
protected 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;
/**
* Add a templated message to the dialogue.

View File

@ -39,6 +39,13 @@ export declare class HideoutHelper {
static maxSkillPoint: number;
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);
/**
* 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;
/**
* This convenience function initializes new Production Object
@ -61,6 +68,16 @@ export declare class HideoutHelper {
* @param sessionID Session id
*/
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
* @param pmcData profile to update

View File

@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
*/
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 itemSellCount count of items to sell
* @returns Array of purchases of item(s) listed

View File

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

View File

@ -1,6 +1,7 @@
import { ITraderBase } from "../models/eft/common/tables/ITrader";
import { DialogueHelper } from "../helpers/DialogueHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { LocaleService } from "./LocaleService";
import { LocalisationService } from "./LocalisationService";
export declare class InsuranceService {
protected logger: ILogger;
@ -26,10 +28,12 @@ export declare class InsuranceService {
protected dialogueHelper: DialogueHelper;
protected handbookHelper: HandbookHelper;
protected localisationService: LocalisationService;
protected localeService: LocaleService;
protected notificationSendHelper: NotificationSendHelper;
protected configServer: ConfigServer;
protected insured: Record<string, Record<string, Item[]>>;
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;
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
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
*/
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;
/**
* 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);
/**
* Create cache and store inside ItemBaseClassService
* Store a dict of an items tpl to the base classes it and its parents have
*/
hydrateItemBaseClassCache(): void;
/**