From 7dab084b7cc7a13fab0040ab656f08366e0bc8ee Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 6 Jun 2023 16:37:29 +0100 Subject: [PATCH] Update types to match server --- .../controllers/CustomizationController.d.ts | 20 ++++++++++++++++++- .../types/controllers/HideoutController.d.ts | 2 +- .../types/controllers/InraidController.d.ts | 7 +------ .../types/helpers/DialogueHelper.d.ts | 7 +++++++ .../types/helpers/HideoutHelper.d.ts | 17 ++++++++++++++++ .../types/helpers/RagfairSellHelper.d.ts | 2 +- .../eft/common/tables/ITemplateItem.d.ts | 2 +- .../types/services/InsuranceService.d.ts | 11 +++++++++- .../types/services/ItemBaseClassService.d.ts | 1 + .../controllers/CustomizationController.d.ts | 20 ++++++++++++++++++- .../types/controllers/HideoutController.d.ts | 2 +- .../types/controllers/InraidController.d.ts | 7 +------ .../types/helpers/DialogueHelper.d.ts | 7 +++++++ .../types/helpers/HideoutHelper.d.ts | 17 ++++++++++++++++ .../types/helpers/RagfairSellHelper.d.ts | 2 +- .../eft/common/tables/ITemplateItem.d.ts | 2 +- .../types/services/InsuranceService.d.ts | 11 +++++++++- .../types/services/ItemBaseClassService.d.ts | 1 + .../controllers/CustomizationController.d.ts | 20 ++++++++++++++++++- .../types/controllers/HideoutController.d.ts | 2 +- .../types/controllers/InraidController.d.ts | 7 +------ .../types/helpers/DialogueHelper.d.ts | 7 +++++++ .../types/helpers/HideoutHelper.d.ts | 17 ++++++++++++++++ .../types/helpers/RagfairSellHelper.d.ts | 2 +- .../eft/common/tables/ITemplateItem.d.ts | 2 +- .../types/services/InsuranceService.d.ts | 11 +++++++++- .../types/services/ItemBaseClassService.d.ts | 1 + .../controllers/CustomizationController.d.ts | 20 ++++++++++++++++++- .../types/controllers/HideoutController.d.ts | 2 +- .../types/controllers/InraidController.d.ts | 7 +------ .../types/helpers/DialogueHelper.d.ts | 7 +++++++ .../types/helpers/HideoutHelper.d.ts | 17 ++++++++++++++++ .../types/helpers/RagfairSellHelper.d.ts | 2 +- .../eft/common/tables/ITemplateItem.d.ts | 2 +- .../types/services/InsuranceService.d.ts | 11 +++++++++- .../types/services/ItemBaseClassService.d.ts | 1 + .../controllers/CustomizationController.d.ts | 20 ++++++++++++++++++- .../types/controllers/HideoutController.d.ts | 2 +- .../types/controllers/InraidController.d.ts | 7 +------ .../types/helpers/DialogueHelper.d.ts | 7 +++++++ .../types/helpers/HideoutHelper.d.ts | 17 ++++++++++++++++ .../types/helpers/RagfairSellHelper.d.ts | 2 +- .../eft/common/tables/ITemplateItem.d.ts | 2 +- .../types/services/InsuranceService.d.ts | 11 +++++++++- .../types/services/ItemBaseClassService.d.ts | 1 + 45 files changed, 290 insertions(+), 55 deletions(-) diff --git a/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts b/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts index e08a91b..8735cae 100644 --- a/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/CustomizationController.d.ts @@ -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; /** diff --git a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts index 5a3a273..dd4235f 100644 --- a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 23ca135..70c1dab 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts index 1f00e38..898bf8e 100644 --- a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts @@ -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. diff --git a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts index fed487c..c718865 100644 --- a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairSellHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairSellHelper.d.ts index bf7aeb6..251d7ca 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairSellHelper.d.ts @@ -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 diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts index f2dc57f..39c8e90 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts @@ -377,7 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; - RandomLootSettings: IRandomLootSettings; + RandomLootSettings?: IRandomLootSettings; } export interface IHealthEffect { type: string; diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index 7ddf679..32fffba 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -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>; 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; @@ -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 diff --git a/TypeScript/18CustomItemService/types/services/ItemBaseClassService.d.ts b/TypeScript/18CustomItemService/types/services/ItemBaseClassService.d.ts index d7bc4bc..43fe451 100644 --- a/TypeScript/18CustomItemService/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ItemBaseClassService.d.ts @@ -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; /** diff --git a/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts b/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts index e08a91b..8735cae 100644 --- a/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/CustomizationController.d.ts @@ -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; /** diff --git a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts index 5a3a273..dd4235f 100644 --- a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index 23ca135..70c1dab 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -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 diff --git a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts index 1f00e38..898bf8e 100644 --- a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts @@ -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. diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index fed487c..c718865 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -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 diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts index bf7aeb6..251d7ca 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairSellHelper.d.ts @@ -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 diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts index f2dc57f..39c8e90 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts @@ -377,7 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; - RandomLootSettings: IRandomLootSettings; + RandomLootSettings?: IRandomLootSettings; } export interface IHealthEffect { type: string; diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 7ddf679..32fffba 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -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>; 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; @@ -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 diff --git a/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts b/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts index d7bc4bc..43fe451 100644 --- a/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ItemBaseClassService.d.ts @@ -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; /** diff --git a/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts b/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts index e08a91b..8735cae 100644 --- a/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/CustomizationController.d.ts @@ -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; /** diff --git a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts index 5a3a273..dd4235f 100644 --- a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index 23ca135..70c1dab 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -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 diff --git a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts index 1f00e38..898bf8e 100644 --- a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts @@ -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. diff --git a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts index fed487c..c718865 100644 --- a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts @@ -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 diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts index bf7aeb6..251d7ca 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairSellHelper.d.ts @@ -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 diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts index f2dc57f..39c8e90 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts @@ -377,7 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; - RandomLootSettings: IRandomLootSettings; + RandomLootSettings?: IRandomLootSettings; } export interface IHealthEffect { type: string; diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 7ddf679..32fffba 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -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>; 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; @@ -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 diff --git a/TypeScript/2EditDatabase/types/services/ItemBaseClassService.d.ts b/TypeScript/2EditDatabase/types/services/ItemBaseClassService.d.ts index d7bc4bc..43fe451 100644 --- a/TypeScript/2EditDatabase/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ItemBaseClassService.d.ts @@ -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; /** diff --git a/TypeScript/3GetSptConfigFile/types/controllers/CustomizationController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/CustomizationController.d.ts index e08a91b..8735cae 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/CustomizationController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/CustomizationController.d.ts @@ -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; /** diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts index 5a3a273..dd4235f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index 23ca135..70c1dab 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -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 diff --git a/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts index 1f00e38..898bf8e 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts @@ -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. diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts index fed487c..c718865 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts @@ -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 diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts index bf7aeb6..251d7ca 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairSellHelper.d.ts @@ -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 diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index f2dc57f..39c8e90 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -377,7 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; - RandomLootSettings: IRandomLootSettings; + RandomLootSettings?: IRandomLootSettings; } export interface IHealthEffect { type: string; diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index 7ddf679..32fffba 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -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>; 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; @@ -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 diff --git a/TypeScript/3GetSptConfigFile/types/services/ItemBaseClassService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ItemBaseClassService.d.ts index d7bc4bc..43fe451 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ItemBaseClassService.d.ts @@ -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; /** diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts index e08a91b..8735cae 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/CustomizationController.d.ts @@ -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; /** diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index 5a3a273..dd4235f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 23ca135..70c1dab 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts index 1f00e38..898bf8e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts @@ -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. diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index fed487c..c718865 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts index bf7aeb6..251d7ca 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairSellHelper.d.ts @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index f2dc57f..39c8e90 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -377,7 +377,7 @@ export interface Props { ExplosionEffectType?: string; LinkedWeapon?: string; UseAmmoWithoutShell?: boolean; - RandomLootSettings: IRandomLootSettings; + RandomLootSettings?: IRandomLootSettings; } export interface IHealthEffect { type: string; diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 7ddf679..32fffba 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -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>; 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; @@ -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 diff --git a/TypeScript/4UseACustomConfigFile/types/services/ItemBaseClassService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ItemBaseClassService.d.ts index d7bc4bc..43fe451 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ItemBaseClassService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ItemBaseClassService.d.ts @@ -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; /**