Udpate types to match 3.5.8 hotfixes
This commit is contained in:
parent
7b2f9c2862
commit
561e30f57c
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -63,6 +63,12 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a event router response with inventory trader message
|
||||||
|
* @param output Item event router response
|
||||||
|
* @returns Item event router response
|
||||||
|
*/
|
||||||
|
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
|
@ -64,6 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated replaced by getRandomItemFromPoolByRole()
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc is the bot being created a pmc
|
||||||
@ -71,11 +72,25 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
|
* @param pool pool of items to pick an item from
|
||||||
|
* @param isPmc is the bot being created a pmc
|
||||||
|
* @returns ITemplateItem object
|
||||||
|
*/
|
||||||
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
|
/**
|
||||||
|
* @deprecated Replaced by getBotLootNValueByRole()
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param isPmc if true the pmc nvalue is returned
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
protected getBotLootNValue(isPmc: boolean): number;
|
||||||
|
/**
|
||||||
|
* Get the loot nvalue from botconfig
|
||||||
|
* @param botRole role of bot e.g. assault/sptBear
|
||||||
|
* @returns nvalue as number
|
||||||
|
*/
|
||||||
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Update item limit array to contain items that have a limit
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
|
@ -2,7 +2,7 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointsForced, SpawnpointTemplate } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -13,7 +13,7 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
|
|||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "../utils/RandomUtil";
|
||||||
export interface IContainerItem {
|
export interface IContainerItem {
|
||||||
items: Item[];
|
items: Item[];
|
||||||
width: number;
|
width: number;
|
||||||
@ -35,15 +35,38 @@ export declare class LocationGenerator {
|
|||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container
|
* Choose loot to put into a static container based on weighting
|
||||||
* @param containerIn
|
* Handle forced items + seasonal item removal when not in season
|
||||||
* @param staticForced
|
* @param staticContainer The container itself we will add loot to
|
||||||
* @param staticLootDist
|
* @param staticForced Loot we need to force into the container
|
||||||
* @param staticAmmoDist
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param staticAmmoDist staticAmmo.json
|
||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
|
/**
|
||||||
|
* Get a 2d grid of a containers item slots
|
||||||
|
* @param containerTpl Tpl id of the container
|
||||||
|
* @returns number[][]
|
||||||
|
*/
|
||||||
|
protected getContainerMapping(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Look up a containers itemcountDistribution data and choose an item count based on the found weights
|
||||||
|
* @param containerTypeId Container to get item count for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @param locationName Map name (to get per-map multiplier for from config)
|
||||||
|
* @returns item count
|
||||||
|
*/
|
||||||
|
protected getWeightedCountOfContainerItems(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>, locationName: string): number;
|
||||||
|
/**
|
||||||
|
* Get all possible loot items that can be placed into a container
|
||||||
|
* Do not add seasonal items if found + current date is inside seasonal event
|
||||||
|
* @param containerTypeId Contianer to get possible loot for
|
||||||
|
* @param staticLootDist staticLoot.json
|
||||||
|
* @returns ProbabilityObjectArray of item tpls + probabilty
|
||||||
|
*/
|
||||||
|
protected getPossibleLootItemsForContainer(containerTypeId: string, staticLootDist: Record<string, IStaticLootDetails>): ProbabilityObjectArray<string, number>;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
/**
|
/**
|
||||||
|
@ -8,5 +8,5 @@ export declare class FindSlotResult {
|
|||||||
export declare class ContainerHelper {
|
export declare class ContainerHelper {
|
||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ export interface Condition {
|
|||||||
max: number;
|
max: number;
|
||||||
}
|
}
|
||||||
export interface Blacklist {
|
export interface Blacklist {
|
||||||
|
/** Damaged ammo packs */
|
||||||
|
damagedAmmoPacks: boolean;
|
||||||
/** Custom blacklist for item Tpls */
|
/** Custom blacklist for item Tpls */
|
||||||
custom: string[];
|
custom: string[];
|
||||||
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
||||||
|
@ -34,7 +34,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Add placeholder values for the new sealed weapon containers
|
* Add placeholder values for items missing from handbook
|
||||||
*/
|
*/
|
||||||
protected addMissingHandbookPrices(): void;
|
protected addMissingHandbookPrices(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user