Update types for 3.5.8
This commit is contained in:
parent
7dab084b7c
commit
2d51bf4844
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
@ -26,6 +26,7 @@ export interface AirdropChancePercent {
|
|||||||
export interface AirdropLoot {
|
export interface AirdropLoot {
|
||||||
presetCount?: MinMax;
|
presetCount?: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IInventoryConfig extends IBaseConfig {
|
export interface IInventoryConfig extends IBaseConfig {
|
||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
rewardTypePool?: Record<string, number>;
|
||||||
|
}
|
||||||
|
export interface ISealedAirdropContainerSettings {
|
||||||
|
weaponRewardWeight: Record<string, number>;
|
||||||
|
defaultPresetsOnly: boolean;
|
||||||
|
foundInRaid: boolean;
|
||||||
|
weaponModRewardLimits: Record<string, MinMax>;
|
||||||
|
rewardTypeLimits: Record<string, MinMax>;
|
||||||
|
ammoBoxWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { MinMax } from "../../common/MinMax";
|
|||||||
export interface LootRequest {
|
export interface LootRequest {
|
||||||
presetCount: MinMax;
|
presetCount: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocaleService } from "./LocaleService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class InsuranceService {
|
export declare class InsuranceService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -26,10 +28,12 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
@ -50,6 +54,11 @@ export declare class InsuranceService {
|
|||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||||
|
/**
|
||||||
|
* Send a message to player informing them gear was lost
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||||
|
@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
|
|||||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Create cache and store inside ItemBaseClassService
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
* Store a dict of an items tpl to the base classes it and its parents have
|
||||||
*/
|
*/
|
||||||
hydrateItemBaseClassCache(): void;
|
hydrateItemBaseClassCache(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
export declare class RagfairLinkedItemService {
|
export declare class RagfairLinkedItemService {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected linkedItemsCache: Record<string, Iterable<string>>;
|
protected linkedItemsCache: Record<string, Set<string>>;
|
||||||
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
getLinkedItems(linkedSearchId: string): Iterable<string>;
|
getLinkedItems(linkedSearchId: string): Set<string>;
|
||||||
|
/**
|
||||||
|
* Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl
|
||||||
|
* @param itemTpl Item to get sub-items for
|
||||||
|
* @returns ITemplateItem array
|
||||||
|
*/
|
||||||
|
getLinkedDbItems(itemTpl: string): ITemplateItem[];
|
||||||
/**
|
/**
|
||||||
* Create Dictionary of every item and the items associated with it
|
* Create Dictionary of every item and the items associated with it
|
||||||
*/
|
*/
|
||||||
@ -17,5 +23,11 @@ export declare class RagfairLinkedItemService {
|
|||||||
* @param applyLinkedItems
|
* @param applyLinkedItems
|
||||||
*/
|
*/
|
||||||
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
||||||
|
/**
|
||||||
|
* Scans a given slot type for filters and returns them as a Set
|
||||||
|
* @param item
|
||||||
|
* @param slot
|
||||||
|
* @returns array of ids
|
||||||
|
*/
|
||||||
protected getFilters(item: ITemplateItem, slot: string): string[];
|
protected getFilters(item: ITemplateItem, slot: string): string[];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Add placeholder values for the new sealed weapon containers
|
||||||
|
*/
|
||||||
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -143,7 +143,7 @@ export declare class RandomUtil {
|
|||||||
* Drawing can be with or without replacement
|
* Drawing can be with or without replacement
|
||||||
* @param {array} list The array we want to draw randomly from
|
* @param {array} list The array we want to draw randomly from
|
||||||
* @param {integer} count The number of times we want to draw
|
* @param {integer} count The number of times we want to draw
|
||||||
* @param {boolean} replacement Draw with or without replacement from the input array
|
* @param {boolean} replacement Draw with or without replacement from the input array(defult true)
|
||||||
* @return {array} Array consisting of N random elements
|
* @return {array} Array consisting of N random elements
|
||||||
*/
|
*/
|
||||||
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
||||||
|
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
@ -26,6 +26,7 @@ export interface AirdropChancePercent {
|
|||||||
export interface AirdropLoot {
|
export interface AirdropLoot {
|
||||||
presetCount?: MinMax;
|
presetCount?: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IInventoryConfig extends IBaseConfig {
|
export interface IInventoryConfig extends IBaseConfig {
|
||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
rewardTypePool?: Record<string, number>;
|
||||||
|
}
|
||||||
|
export interface ISealedAirdropContainerSettings {
|
||||||
|
weaponRewardWeight: Record<string, number>;
|
||||||
|
defaultPresetsOnly: boolean;
|
||||||
|
foundInRaid: boolean;
|
||||||
|
weaponModRewardLimits: Record<string, MinMax>;
|
||||||
|
rewardTypeLimits: Record<string, MinMax>;
|
||||||
|
ammoBoxWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { MinMax } from "../../common/MinMax";
|
|||||||
export interface LootRequest {
|
export interface LootRequest {
|
||||||
presetCount: MinMax;
|
presetCount: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocaleService } from "./LocaleService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class InsuranceService {
|
export declare class InsuranceService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -26,10 +28,12 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
@ -50,6 +54,11 @@ export declare class InsuranceService {
|
|||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||||
|
/**
|
||||||
|
* Send a message to player informing them gear was lost
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||||
|
@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
|
|||||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Create cache and store inside ItemBaseClassService
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
* Store a dict of an items tpl to the base classes it and its parents have
|
||||||
*/
|
*/
|
||||||
hydrateItemBaseClassCache(): void;
|
hydrateItemBaseClassCache(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
export declare class RagfairLinkedItemService {
|
export declare class RagfairLinkedItemService {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected linkedItemsCache: Record<string, Iterable<string>>;
|
protected linkedItemsCache: Record<string, Set<string>>;
|
||||||
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
getLinkedItems(linkedSearchId: string): Iterable<string>;
|
getLinkedItems(linkedSearchId: string): Set<string>;
|
||||||
|
/**
|
||||||
|
* Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl
|
||||||
|
* @param itemTpl Item to get sub-items for
|
||||||
|
* @returns ITemplateItem array
|
||||||
|
*/
|
||||||
|
getLinkedDbItems(itemTpl: string): ITemplateItem[];
|
||||||
/**
|
/**
|
||||||
* Create Dictionary of every item and the items associated with it
|
* Create Dictionary of every item and the items associated with it
|
||||||
*/
|
*/
|
||||||
@ -17,5 +23,11 @@ export declare class RagfairLinkedItemService {
|
|||||||
* @param applyLinkedItems
|
* @param applyLinkedItems
|
||||||
*/
|
*/
|
||||||
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
||||||
|
/**
|
||||||
|
* Scans a given slot type for filters and returns them as a Set
|
||||||
|
* @param item
|
||||||
|
* @param slot
|
||||||
|
* @returns array of ids
|
||||||
|
*/
|
||||||
protected getFilters(item: ITemplateItem, slot: string): string[];
|
protected getFilters(item: ITemplateItem, slot: string): string[];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Add placeholder values for the new sealed weapon containers
|
||||||
|
*/
|
||||||
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -143,7 +143,7 @@ export declare class RandomUtil {
|
|||||||
* Drawing can be with or without replacement
|
* Drawing can be with or without replacement
|
||||||
* @param {array} list The array we want to draw randomly from
|
* @param {array} list The array we want to draw randomly from
|
||||||
* @param {integer} count The number of times we want to draw
|
* @param {integer} count The number of times we want to draw
|
||||||
* @param {boolean} replacement Draw with or without replacement from the input array
|
* @param {boolean} replacement Draw with or without replacement from the input array(defult true)
|
||||||
* @return {array} Array consisting of N random elements
|
* @return {array} Array consisting of N random elements
|
||||||
*/
|
*/
|
||||||
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
||||||
|
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
@ -26,6 +26,7 @@ export interface AirdropChancePercent {
|
|||||||
export interface AirdropLoot {
|
export interface AirdropLoot {
|
||||||
presetCount?: MinMax;
|
presetCount?: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IInventoryConfig extends IBaseConfig {
|
export interface IInventoryConfig extends IBaseConfig {
|
||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
rewardTypePool?: Record<string, number>;
|
||||||
|
}
|
||||||
|
export interface ISealedAirdropContainerSettings {
|
||||||
|
weaponRewardWeight: Record<string, number>;
|
||||||
|
defaultPresetsOnly: boolean;
|
||||||
|
foundInRaid: boolean;
|
||||||
|
weaponModRewardLimits: Record<string, MinMax>;
|
||||||
|
rewardTypeLimits: Record<string, MinMax>;
|
||||||
|
ammoBoxWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { MinMax } from "../../common/MinMax";
|
|||||||
export interface LootRequest {
|
export interface LootRequest {
|
||||||
presetCount: MinMax;
|
presetCount: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocaleService } from "./LocaleService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class InsuranceService {
|
export declare class InsuranceService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -26,10 +28,12 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
@ -50,6 +54,11 @@ export declare class InsuranceService {
|
|||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||||
|
/**
|
||||||
|
* Send a message to player informing them gear was lost
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||||
|
@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
|
|||||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Create cache and store inside ItemBaseClassService
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
* Store a dict of an items tpl to the base classes it and its parents have
|
||||||
*/
|
*/
|
||||||
hydrateItemBaseClassCache(): void;
|
hydrateItemBaseClassCache(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
export declare class RagfairLinkedItemService {
|
export declare class RagfairLinkedItemService {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected linkedItemsCache: Record<string, Iterable<string>>;
|
protected linkedItemsCache: Record<string, Set<string>>;
|
||||||
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
getLinkedItems(linkedSearchId: string): Iterable<string>;
|
getLinkedItems(linkedSearchId: string): Set<string>;
|
||||||
|
/**
|
||||||
|
* Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl
|
||||||
|
* @param itemTpl Item to get sub-items for
|
||||||
|
* @returns ITemplateItem array
|
||||||
|
*/
|
||||||
|
getLinkedDbItems(itemTpl: string): ITemplateItem[];
|
||||||
/**
|
/**
|
||||||
* Create Dictionary of every item and the items associated with it
|
* Create Dictionary of every item and the items associated with it
|
||||||
*/
|
*/
|
||||||
@ -17,5 +23,11 @@ export declare class RagfairLinkedItemService {
|
|||||||
* @param applyLinkedItems
|
* @param applyLinkedItems
|
||||||
*/
|
*/
|
||||||
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
||||||
|
/**
|
||||||
|
* Scans a given slot type for filters and returns them as a Set
|
||||||
|
* @param item
|
||||||
|
* @param slot
|
||||||
|
* @returns array of ids
|
||||||
|
*/
|
||||||
protected getFilters(item: ITemplateItem, slot: string): string[];
|
protected getFilters(item: ITemplateItem, slot: string): string[];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Add placeholder values for the new sealed weapon containers
|
||||||
|
*/
|
||||||
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -143,7 +143,7 @@ export declare class RandomUtil {
|
|||||||
* Drawing can be with or without replacement
|
* Drawing can be with or without replacement
|
||||||
* @param {array} list The array we want to draw randomly from
|
* @param {array} list The array we want to draw randomly from
|
||||||
* @param {integer} count The number of times we want to draw
|
* @param {integer} count The number of times we want to draw
|
||||||
* @param {boolean} replacement Draw with or without replacement from the input array
|
* @param {boolean} replacement Draw with or without replacement from the input array(defult true)
|
||||||
* @return {array} Array consisting of N random elements
|
* @return {array} Array consisting of N random elements
|
||||||
*/
|
*/
|
||||||
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
||||||
|
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
@ -26,6 +26,7 @@ export interface AirdropChancePercent {
|
|||||||
export interface AirdropLoot {
|
export interface AirdropLoot {
|
||||||
presetCount?: MinMax;
|
presetCount?: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IInventoryConfig extends IBaseConfig {
|
export interface IInventoryConfig extends IBaseConfig {
|
||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
rewardTypePool?: Record<string, number>;
|
||||||
|
}
|
||||||
|
export interface ISealedAirdropContainerSettings {
|
||||||
|
weaponRewardWeight: Record<string, number>;
|
||||||
|
defaultPresetsOnly: boolean;
|
||||||
|
foundInRaid: boolean;
|
||||||
|
weaponModRewardLimits: Record<string, MinMax>;
|
||||||
|
rewardTypeLimits: Record<string, MinMax>;
|
||||||
|
ammoBoxWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { MinMax } from "../../common/MinMax";
|
|||||||
export interface LootRequest {
|
export interface LootRequest {
|
||||||
presetCount: MinMax;
|
presetCount: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocaleService } from "./LocaleService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class InsuranceService {
|
export declare class InsuranceService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -26,10 +28,12 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
@ -50,6 +54,11 @@ export declare class InsuranceService {
|
|||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||||
|
/**
|
||||||
|
* Send a message to player informing them gear was lost
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||||
|
@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
|
|||||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Create cache and store inside ItemBaseClassService
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
* Store a dict of an items tpl to the base classes it and its parents have
|
||||||
*/
|
*/
|
||||||
hydrateItemBaseClassCache(): void;
|
hydrateItemBaseClassCache(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
export declare class RagfairLinkedItemService {
|
export declare class RagfairLinkedItemService {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected linkedItemsCache: Record<string, Iterable<string>>;
|
protected linkedItemsCache: Record<string, Set<string>>;
|
||||||
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
getLinkedItems(linkedSearchId: string): Iterable<string>;
|
getLinkedItems(linkedSearchId: string): Set<string>;
|
||||||
|
/**
|
||||||
|
* Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl
|
||||||
|
* @param itemTpl Item to get sub-items for
|
||||||
|
* @returns ITemplateItem array
|
||||||
|
*/
|
||||||
|
getLinkedDbItems(itemTpl: string): ITemplateItem[];
|
||||||
/**
|
/**
|
||||||
* Create Dictionary of every item and the items associated with it
|
* Create Dictionary of every item and the items associated with it
|
||||||
*/
|
*/
|
||||||
@ -17,5 +23,11 @@ export declare class RagfairLinkedItemService {
|
|||||||
* @param applyLinkedItems
|
* @param applyLinkedItems
|
||||||
*/
|
*/
|
||||||
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
||||||
|
/**
|
||||||
|
* Scans a given slot type for filters and returns them as a Set
|
||||||
|
* @param item
|
||||||
|
* @param slot
|
||||||
|
* @returns array of ids
|
||||||
|
*/
|
||||||
protected getFilters(item: ITemplateItem, slot: string): string[];
|
protected getFilters(item: ITemplateItem, slot: string): string[];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Add placeholder values for the new sealed weapon containers
|
||||||
|
*/
|
||||||
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -143,7 +143,7 @@ export declare class RandomUtil {
|
|||||||
* Drawing can be with or without replacement
|
* Drawing can be with or without replacement
|
||||||
* @param {array} list The array we want to draw randomly from
|
* @param {array} list The array we want to draw randomly from
|
||||||
* @param {integer} count The number of times we want to draw
|
* @param {integer} count The number of times we want to draw
|
||||||
* @param {boolean} replacement Draw with or without replacement from the input array
|
* @param {boolean} replacement Draw with or without replacement from the input array(defult true)
|
||||||
* @return {array} Array consisting of N random elements
|
* @return {array} Array consisting of N random elements
|
||||||
*/
|
*/
|
||||||
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
||||||
|
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
@ -26,6 +26,7 @@ export interface AirdropChancePercent {
|
|||||||
export interface AirdropLoot {
|
export interface AirdropLoot {
|
||||||
presetCount?: MinMax;
|
presetCount?: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
|
import { MinMax } from "../../../models/common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface IInventoryConfig extends IBaseConfig {
|
export interface IInventoryConfig extends IBaseConfig {
|
||||||
kind: "aki-inventory";
|
kind: "aki-inventory";
|
||||||
newItemsMarkedFound: boolean;
|
newItemsMarkedFound: boolean;
|
||||||
randomLootContainers: Record<string, RewardDetails>;
|
randomLootContainers: Record<string, RewardDetails>;
|
||||||
|
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||||
customMoneyTpls: string[];
|
customMoneyTpls: string[];
|
||||||
}
|
}
|
||||||
export interface RewardDetails {
|
export interface RewardDetails {
|
||||||
rewardCount: number;
|
rewardCount: number;
|
||||||
foundInRaid: boolean;
|
foundInRaid: boolean;
|
||||||
rewardTplPool: Record<string, number>;
|
rewardTplPool?: Record<string, number>;
|
||||||
|
rewardTypePool?: Record<string, number>;
|
||||||
|
}
|
||||||
|
export interface ISealedAirdropContainerSettings {
|
||||||
|
weaponRewardWeight: Record<string, number>;
|
||||||
|
defaultPresetsOnly: boolean;
|
||||||
|
foundInRaid: boolean;
|
||||||
|
weaponModRewardLimits: Record<string, MinMax>;
|
||||||
|
rewardTypeLimits: Record<string, MinMax>;
|
||||||
|
ammoBoxWhitelist: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { MinMax } from "../../common/MinMax";
|
|||||||
export interface LootRequest {
|
export interface LootRequest {
|
||||||
presetCount: MinMax;
|
presetCount: MinMax;
|
||||||
itemCount: MinMax;
|
itemCount: MinMax;
|
||||||
|
weaponCrateCount: MinMax;
|
||||||
itemBlacklist: string[];
|
itemBlacklist: string[];
|
||||||
itemTypeWhitelist: string[];
|
itemTypeWhitelist: string[];
|
||||||
/** key: item base type: value: max count */
|
/** key: item base type: value: max count */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -14,6 +15,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
import { LocaleService } from "./LocaleService";
|
||||||
import { LocalisationService } from "./LocalisationService";
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class InsuranceService {
|
export declare class InsuranceService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -26,10 +28,12 @@ export declare class InsuranceService {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, notificationSendHelper: NotificationSendHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
@ -50,6 +54,11 @@ export declare class InsuranceService {
|
|||||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||||
*/
|
*/
|
||||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||||
|
/**
|
||||||
|
* Send a message to player informing them gear was lost
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
sendLostInsuranceMessage(sessionID: string): void;
|
||||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||||
|
@ -14,6 +14,7 @@ export declare class ItemBaseClassService {
|
|||||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
/**
|
||||||
* Create cache and store inside ItemBaseClassService
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
* Store a dict of an items tpl to the base classes it and its parents have
|
||||||
*/
|
*/
|
||||||
hydrateItemBaseClassCache(): void;
|
hydrateItemBaseClassCache(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,15 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
export declare class RagfairLinkedItemService {
|
export declare class RagfairLinkedItemService {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected linkedItemsCache: Record<string, Iterable<string>>;
|
protected linkedItemsCache: Record<string, Set<string>>;
|
||||||
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
getLinkedItems(linkedSearchId: string): Iterable<string>;
|
getLinkedItems(linkedSearchId: string): Set<string>;
|
||||||
|
/**
|
||||||
|
* Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl
|
||||||
|
* @param itemTpl Item to get sub-items for
|
||||||
|
* @returns ITemplateItem array
|
||||||
|
*/
|
||||||
|
getLinkedDbItems(itemTpl: string): ITemplateItem[];
|
||||||
/**
|
/**
|
||||||
* Create Dictionary of every item and the items associated with it
|
* Create Dictionary of every item and the items associated with it
|
||||||
*/
|
*/
|
||||||
@ -17,5 +23,11 @@ export declare class RagfairLinkedItemService {
|
|||||||
* @param applyLinkedItems
|
* @param applyLinkedItems
|
||||||
*/
|
*/
|
||||||
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
protected addRevolverCylinderAmmoToLinkedItems(cylinder: ITemplateItem, applyLinkedItems: (items: string[]) => void): void;
|
||||||
|
/**
|
||||||
|
* Scans a given slot type for filters and returns them as a Set
|
||||||
|
* @param item
|
||||||
|
* @param slot
|
||||||
|
* @returns array of ids
|
||||||
|
*/
|
||||||
protected getFilters(item: ITemplateItem, slot: string): string[];
|
protected getFilters(item: ITemplateItem, slot: string): string[];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
* Generate static (handbook) and dynamic (prices.json) flea prices, store inside class as dictionaries
|
||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Add placeholder values for the new sealed weapon containers
|
||||||
|
*/
|
||||||
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -143,7 +143,7 @@ export declare class RandomUtil {
|
|||||||
* Drawing can be with or without replacement
|
* Drawing can be with or without replacement
|
||||||
* @param {array} list The array we want to draw randomly from
|
* @param {array} list The array we want to draw randomly from
|
||||||
* @param {integer} count The number of times we want to draw
|
* @param {integer} count The number of times we want to draw
|
||||||
* @param {boolean} replacement Draw with or without replacement from the input array
|
* @param {boolean} replacement Draw with or without replacement from the input array(defult true)
|
||||||
* @return {array} Array consisting of N random elements
|
* @return {array} Array consisting of N random elements
|
||||||
*/
|
*/
|
||||||
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
drawRandomFromList<T>(list: Array<T>, count?: number, replacement?: boolean): Array<T>;
|
||||||
|
@ -16,16 +16,34 @@ export declare class CustomizationController {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected readonly clothingIds: {
|
||||||
|
lowerParentId: string;
|
||||||
|
upperParentId: string;
|
||||||
|
};
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
|
/**
|
||||||
|
* Get purchasable clothing items from trader that match players side (usec/bear)
|
||||||
|
* @param traderID trader to look up clothing for
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns ISuit array
|
||||||
|
*/
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
|
/** Equip one to many clothing items to player */
|
||||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Purchase/unlock a clothing item from a trader
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param buyClothingRequest Request object
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||||
/**
|
/**
|
||||||
* Has an outfit been purchased by a player
|
* Has an outfit been purchased by a player
|
||||||
* @param suitId clothing id
|
* @param suitId clothing id
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns true/false
|
* @returns true if purchased already
|
||||||
*/
|
*/
|
||||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Start area production for item
|
* Start area production for item by adding production to profiles' Hideout.Production array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Start production request
|
* @param request Start production request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
@ -3,7 +3,6 @@ import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { NotificationSendHelper } from "../helpers/NotificationSendHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -18,7 +17,6 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "../services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
import { PmcChatResponseService } from "../services/PmcChatResponseService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,14 +30,12 @@ export declare class InraidController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected pmcChatResponseService: PmcChatResponseService;
|
protected pmcChatResponseService: PmcChatResponseService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -48,7 +44,7 @@ export declare class InraidController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, localeService: LocaleService, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, notificationSendHelper: NotificationSendHelper, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -97,7 +93,6 @@ export declare class InraidController {
|
|||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
protected sendLostInsuranceMessage(sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||||
* @param statusOnExit exit value from offraidData object
|
* @param statusOnExit exit value from offraidData object
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import { LootGenerator } from "../generators/LootGenerator";
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -37,6 +38,7 @@ export declare class InventoryController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
@ -44,12 +46,12 @@ export declare class InventoryController {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Preset } from "../models/eft/common/IGlobals";
|
import { Preset } from "../models/eft/common/IGlobals";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { AddItem } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
|
import { ISealedAirdropContainerSettings, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "../models/spt/services/LootItem";
|
import { LootItem } from "../models/spt/services/LootItem";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairLinkedItemService } from "../services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
@ -19,9 +25,13 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
@ -65,5 +75,39 @@ export declare class LootGenerator {
|
|||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
|
* @param containerSettings sealed weapon container settings
|
||||||
|
* @returns Array of items to add to player inventory
|
||||||
|
*/
|
||||||
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
||||||
|
/**
|
||||||
|
* Get non-weapon mod rewards for a sealed container
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
||||||
|
/**
|
||||||
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
|
* @param containerSettings Sealed weapon container settings
|
||||||
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: Preset): AddItem[];
|
||||||
|
/**
|
||||||
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
|
* @param rewardContainerDetails
|
||||||
|
* @returns AddItem array
|
||||||
|
*/
|
||||||
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
||||||
|
/**
|
||||||
|
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
||||||
|
* Default adds 1, or increments count
|
||||||
|
* @param itemTplToAdd items tpl we want to add to array
|
||||||
|
* @param resultsArray Array to add item tpl to
|
||||||
|
*/
|
||||||
|
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -19,6 +19,13 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Create basic message context template
|
||||||
|
* @param templateId
|
||||||
|
* @param messageType
|
||||||
|
* @param maxStoreTime
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -39,6 +39,13 @@ export declare class HideoutHelper {
|
|||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add production to profiles' Hideout.Production array
|
||||||
|
* @param pmcData Profile to add production to
|
||||||
|
* @param body Production request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns client response
|
||||||
|
*/
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
@ -61,6 +68,16 @@ export declare class HideoutHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
updatePlayerHideout(sessionID: string): void;
|
updatePlayerHideout(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get various properties that will be passed to hideout update-related functions
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Properties
|
||||||
|
*/
|
||||||
|
protected getHideoutProperties(pmcData: IPmcData): {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
|
@ -128,6 +128,7 @@ export declare class InventoryHelper {
|
|||||||
* @returns Reward details
|
* @returns Reward details
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
|
getInventoryConfig(): IInventoryConfig;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -27,7 +27,7 @@ export declare class RagfairSellHelper {
|
|||||||
*/
|
*/
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||||
/**
|
/**
|
||||||
* Determine if the offer being listed will be sold
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
* @param itemSellCount count of items to sell
|
* @param itemSellCount count of items to sell
|
||||||
* @returns Array of purchases of item(s) listed
|
* @returns Array of purchases of item(s) listed
|
||||||
|
@ -377,7 +377,7 @@ export interface Props {
|
|||||||
ExplosionEffectType?: string;
|
ExplosionEffectType?: string;
|
||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -413,8 +413,8 @@ export interface Slot {
|
|||||||
_parent: string;
|
_parent: string;
|
||||||
_props: SlotProps;
|
_props: SlotProps;
|
||||||
_max_count?: number;
|
_max_count?: number;
|
||||||
_required: boolean;
|
_required?: boolean;
|
||||||
_mergeSlotWithChildren: boolean;
|
_mergeSlotWithChildren?: boolean;
|
||||||
_proto: string;
|
_proto: string;
|
||||||
}
|
}
|
||||||
export interface SlotProps {
|
export interface SlotProps {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user