Added IGetAirdropLootResponse
This commit is contained in:
parent
cdcc105f6a
commit
4cf1c10c51
@ -4,6 +4,7 @@ import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
|||||||
import { ILocationBase } from "@spt/models/eft/common/ILocationBase";
|
import { ILocationBase } from "@spt/models/eft/common/ILocationBase";
|
||||||
import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase";
|
import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase";
|
||||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse";
|
||||||
import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData";
|
import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData";
|
||||||
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
|
||||||
|
|
||||||
@ -37,7 +38,11 @@ export class LocationCallbacks
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Handle client/airdrop/loot */
|
/** Handle client/airdrop/loot */
|
||||||
public getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): any
|
public getAirdropLoot(
|
||||||
|
url: string,
|
||||||
|
info: IEmptyRequestData,
|
||||||
|
sessionID: string,
|
||||||
|
): IGetBodyResponseData<IGetAirdropLootResponse>
|
||||||
{
|
{
|
||||||
return this.httpResponse.getBody(this.locationController.getAirdropLoot());
|
return this.httpResponse.getBody(this.locationController.getAirdropLoot());
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper";
|
|||||||
import { ILocationBase } from "@spt/models/eft/common/ILocationBase";
|
import { ILocationBase } from "@spt/models/eft/common/ILocationBase";
|
||||||
import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase";
|
import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase";
|
||||||
import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot";
|
import { ILooseLoot, SpawnpointTemplate } from "@spt/models/eft/common/ILooseLoot";
|
||||||
import { IAirdropLootResult } from "@spt/models/eft/location/IAirdropLootResult";
|
import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse";
|
||||||
import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData";
|
import { IGetLocationRequestData } from "@spt/models/eft/location/IGetLocationRequestData";
|
||||||
import { AirdropTypeEnum } from "@spt/models/enums/AirdropType";
|
import { AirdropTypeEnum } from "@spt/models/enums/AirdropType";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
@ -171,7 +171,7 @@ export class LocationController
|
|||||||
* Generates it randomly based on config/airdrop.json values
|
* Generates it randomly based on config/airdrop.json values
|
||||||
* @returns Array of LootItem objects
|
* @returns Array of LootItem objects
|
||||||
*/
|
*/
|
||||||
public getAirdropLoot(): any // TODO: need to fix
|
public getAirdropLoot(): IGetAirdropLootResponse
|
||||||
{
|
{
|
||||||
const airdropType = this.chooseAirdropType();
|
const airdropType = this.chooseAirdropType();
|
||||||
this.logger.debug(`Chose ${airdropType} for airdrop loot`);
|
this.logger.debug(`Chose ${airdropType} for airdrop loot`);
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
|
import { AirdropTypeEnum } from "@spt/models/enums/AirdropType";
|
||||||
|
|
||||||
|
export interface IGetAirdropLootResponse
|
||||||
|
{
|
||||||
|
// The type of airdrop
|
||||||
|
icon: AirdropTypeEnum
|
||||||
|
container: Item[]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user