Skip to main content
The Deno 2 Release Candidate is here
Learn more
class LocationController
import { LocationController } from "https://deno.land/x/sptaki@1.2.0/controllers/LocationController.d.ts";

Constructors

new
LocationController(
jsonUtil: JsonUtil,
hashUtil: HashUtil,
randomUtil: RandomUtil,
weightedRandomHelper: WeightedRandomHelper,
logger: ILogger,
locationGenerator: LocationGenerator,
localisationService: LocalisationService,
raidTimeAdjustmentService: RaidTimeAdjustmentService,
itemFilterService: ItemFilterService,
lootGenerator: LootGenerator,
databaseServer: DatabaseServer,
timeUtil: TimeUtil,
configServer: ConfigServer,
applicationContext: ApplicationContext,
)

Properties

protected
airdropConfig: IAirdropConfig
protected
applicationContext: ApplicationContext
protected
configServer: ConfigServer
protected
databaseServer: DatabaseServer
protected
hashUtil: HashUtil
protected
itemFilterService: ItemFilterService
protected
jsonUtil: JsonUtil
protected
localisationService: LocalisationService
protected
locationConfig: ILocationConfig
protected
locationGenerator: LocationGenerator
protected
logger: ILogger
protected
lootGenerator: LootGenerator
protected
raidTimeAdjustmentService: RaidTimeAdjustmentService
protected
randomUtil: RandomUtil
protected
timeUtil: TimeUtil
protected
weightedRandomHelper: WeightedRandomHelper

Methods

Randomly pick a type of airdrop loot using weighted values from config

protected
generate(name: string): ILocationBase

Generate a maps base location with loot

Get the configuration for a specific type of airdrop

Handle client/locations Get all maps base location properties without loot data

get(sessionId: string, request: IGetLocationRequestData): ILocationBase

Handle client/location/getLocalloot Get a location (map) with generated loot data

Handle client/location/getAirdropLoot Get loot for an airdrop container Generates it randomly based on config/airdrop.json values