import { LocationGenerator } from "../generators/LocationGenerator"; import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; import { ILocationConfig } from "../models/spt/config/ILocationConfig"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; import { HashUtil } from "../utils/HashUtil"; import { JsonUtil } from "../utils/JsonUtil"; import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class LocationController { protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; protected logger: ILogger; protected locationGenerator: LocationGenerator; protected localisationService: LocalisationService; protected lootGenerator: LootGenerator; protected databaseServer: DatabaseServer; protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data * @param sessionId Player id * @param request Map request to generate * @returns ILocationBase */ get(sessionId: string, request: IGetLocationRequestData): ILocationBase; /** * Generate a maps base location with loot * @param name Map name * @returns ILocationBase */ protected generate(name: string): ILocationBase; /** * Handle client/locations * Get all maps base location properties without loot data * @param sessionId Players Id * @returns ILocationsGenerateAllResponse */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdop container * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ protected chooseAirdropType(): AirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; }