Update types
This commit is contained in:
parent
b3d26a74ca
commit
2843e7e022
@ -1,4 +1,4 @@
|
|||||||
# Mod examples for v3.7.4
|
# Mod examples for v3.7.5
|
||||||
|
|
||||||
A collection of example mods that perform typical actions in SPT
|
A collection of example mods that perform typical actions in SPT
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ export declare class BundleCallbacks {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/bundles
|
* Handle singleplayer/bundles
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullRespons
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class GameCallbacks implements OnLoad {
|
export declare class GameCallbacks implements OnLoad {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -75,4 +75,3 @@ declare class GameCallbacks implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
||||||
}
|
}
|
||||||
export { GameCallbacks };
|
|
||||||
|
@ -17,6 +17,7 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
@ -46,4 +47,5 @@ export declare class InventoryCallbacks {
|
|||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle OpenRandomLootContainer */
|
/** Handle OpenRandomLootContainer */
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileD
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class LauncherCallbacks {
|
export declare class LauncherCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected launcherController: LauncherController;
|
protected launcherController: LauncherController;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -27,4 +27,3 @@ declare class LauncherCallbacks {
|
|||||||
getLoadedServerMods(): string;
|
getLoadedServerMods(): string;
|
||||||
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
}
|
}
|
||||||
export { LauncherCallbacks };
|
|
||||||
|
@ -6,7 +6,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks implements OnLoad {
|
export declare class ModCallbacks implements OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
@ -18,4 +18,3 @@ declare class ModCallbacks implements OnLoad {
|
|||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
export { ModCallbacks };
|
|
||||||
|
@ -23,12 +23,14 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
|
import { PlayerService } from "@spt-aki/services/PlayerService";
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -49,10 +51,11 @@ export declare class InventoryController {
|
|||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected playerService: PlayerService;
|
||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
@ -162,6 +165,7 @@ export declare class InventoryController {
|
|||||||
* @returns response
|
* @returns response
|
||||||
*/
|
*/
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get the tplid of an item from the examine request object
|
* Get the tplid of an item from the examine request object
|
||||||
* @param body response request
|
* @param body response request
|
||||||
@ -217,4 +221,5 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export declare class RagfairController {
|
|||||||
* @param offers ragfair offers to get categories for
|
* @param offers ragfair offers to get categories for
|
||||||
* @returns record with tpls + counts
|
* @returns record with tpls + counts
|
||||||
*/
|
*/
|
||||||
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Add Required offers to offers result
|
* Add Required offers to offers result
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
|
@ -61,7 +61,9 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} sessionId Player's session id
|
* @param {string} _info Request from client
|
||||||
|
* @param {string} sessionID Player's session id
|
||||||
|
*
|
||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
@ -20,7 +20,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class TradeController {
|
export declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
@ -63,4 +63,3 @@ declare class TradeController {
|
|||||||
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
||||||
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
export { TradeController };
|
|
||||||
|
@ -15,7 +15,6 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService";
|
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -38,7 +37,6 @@ export declare class RagfairOfferGenerator {
|
|||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
@ -47,7 +45,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
tpl: string;
|
tpl: string;
|
||||||
price: number;
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
* @param userID Owner of the offer
|
* @param userID Owner of the offer
|
||||||
|
@ -77,10 +77,10 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
*/
|
*/
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
||||||
/**
|
/**
|
||||||
* is the provided item allowed inside a container
|
* Is the provided item allowed inside a container
|
||||||
* @param slot location item wants to be placed in
|
* @param slotGrid Items sub-grid we want to place item inside
|
||||||
* @param itemTpl item being placed
|
* @param itemTpl Item tpl being placed
|
||||||
* @returns true if allowed
|
* @returns True if allowed
|
||||||
*/
|
*/
|
||||||
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
|
protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class LookupItem<T, I> {
|
declare class LookupItem<T, I> {
|
||||||
@ -59,5 +60,6 @@ export declare class HandbookHelper {
|
|||||||
* @returns currency count in desired type
|
* @returns currency count in desired type
|
||||||
*/
|
*/
|
||||||
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
||||||
|
getCategoryById(handbookId: string): Category;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -15,9 +15,11 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
@ -31,7 +33,7 @@ export declare class InRaidHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
protected inRaidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
* @returns True if items should be removed from inventory
|
* @returns True if items should be removed from inventory
|
||||||
@ -60,7 +62,6 @@ export declare class InRaidHelper {
|
|||||||
* Reset a profile to a baseline, used post-raid
|
* Reset a profile to a baseline, used post-raid
|
||||||
* Reset points earned during session property
|
* Reset points earned during session property
|
||||||
* Increment exp
|
* Increment exp
|
||||||
* Remove Labs keycard
|
|
||||||
* @param profileData Profile to update
|
* @param profileData Profile to update
|
||||||
* @param saveProgressRequest post raid save data request data
|
* @param saveProgressRequest post raid save data request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -89,13 +90,13 @@ export declare class InRaidHelper {
|
|||||||
*/
|
*/
|
||||||
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Look for quests with status = fail that were not failed pre-raid and run the failQuest() function
|
* Look for quests with a status different from what it began the raid with
|
||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param preRaidQuests Quests prior to starting raid
|
* @param preRaidQuests Quests prior to starting raid
|
||||||
* @param postRaidProfile Profile sent by client
|
* @param postRaidProfile Profile sent by client with post-raid quests
|
||||||
*/
|
*/
|
||||||
protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
protected processAlteredQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Take body part effects from client profile and apply to server profile
|
* Take body part effects from client profile and apply to server profile
|
||||||
* @param saveProgressRequest post-raid request
|
* @param saveProgressRequest post-raid request
|
||||||
|
@ -15,7 +15,7 @@ import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
|||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
declare class ItemHelper {
|
export declare class ItemHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -355,4 +355,4 @@ declare namespace ItemHelper {
|
|||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export { ItemHelper };
|
export {};
|
||||||
|
@ -4,7 +4,6 @@ import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
|||||||
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult";
|
|
||||||
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,14 +29,19 @@ export declare class RagfairHelper {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getCurrencyTag(currency: string): string;
|
getCurrencyTag(currency: string): string;
|
||||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
filterCategories(sessionID: string, request: ISearchRequestData): string[];
|
||||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||||
protected getCategoryList(handbookId: string): string[];
|
protected getCategoryList(handbookId: string): string[];
|
||||||
countCategories(result: IGetOffersResult): void;
|
|
||||||
/**
|
/**
|
||||||
* Merges Root Items
|
* Merges Root Items
|
||||||
* Ragfair allows abnormally large stacks.
|
* Ragfair allows abnormally large stacks.
|
||||||
*/
|
*/
|
||||||
mergeStackable(items: Item[]): Item[];
|
mergeStackable(items: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Return the symbol for a currency
|
||||||
|
* e.g. 5449016a4bdc2d6f028b456f return ₽
|
||||||
|
* @param currencyTpl currency to get symbol for
|
||||||
|
* @returns symbol of currency
|
||||||
|
*/
|
||||||
getCurrencySymbol(currencyTpl: string): string;
|
getCurrencySymbol(currencyTpl: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,17 @@ import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
|||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RagfairSellHelper {
|
export declare class RagfairSellHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
* @param averageOfferPriceRub Price of average offer in roubles
|
||||||
@ -19,13 +21,6 @@ export declare class RagfairSellHelper {
|
|||||||
* @returns percent value
|
* @returns percent value
|
||||||
*/
|
*/
|
||||||
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
||||||
/**
|
|
||||||
* Get percent chance to sell an item when price is below items average listing price
|
|
||||||
* @param playerListedPriceRub Price player listed item for in roubles
|
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
|
||||||
* @returns percent value
|
|
||||||
*/
|
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Get array of item count and sell time (empty array = no sell)
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
@ -21,6 +22,7 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
|||||||
* Helper class for common ragfair server actions
|
* Helper class for common ragfair server actions
|
||||||
*/
|
*/
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -38,7 +40,7 @@ export declare class RagfairServerHelper {
|
|||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected static goodsReturnedTemplate: string;
|
protected static goodsReturnedTemplate: string;
|
||||||
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Is item valid / on blacklist / quest item
|
* Is item valid / on blacklist / quest item
|
||||||
* @param itemDetails
|
* @param itemDetails
|
||||||
@ -76,14 +78,29 @@ export declare class RagfairServerHelper {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferCurrency(): string;
|
getDynamicOfferCurrency(): string;
|
||||||
getMemberType(userID: string): MemberCategory;
|
getMemberType(userID: string): MemberCategory;
|
||||||
|
/**
|
||||||
|
* Get a player or traders nickname from their profile by their user id
|
||||||
|
* @param userID Sessionid/userid
|
||||||
|
* @returns Nickname of individual
|
||||||
|
*/
|
||||||
getNickname(userID: string): string;
|
getNickname(userID: string): string;
|
||||||
getPresetItems(item: any): Item[];
|
/**
|
||||||
|
* Given a preset id from globals.json, return an array of items[] with unique ids
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns Array of weapon and its children
|
||||||
|
*/
|
||||||
|
getPresetItems(item: Item): Item[];
|
||||||
|
/**
|
||||||
|
* Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getPresetItemsByTpl(item: Item): Item[];
|
getPresetItemsByTpl(item: Item): Item[];
|
||||||
/**
|
/**
|
||||||
* Generate new unique ids for the children while preserving hierarchy
|
* Generate new unique ids for child items while preserving hierarchy
|
||||||
* @param item base item
|
* @param rootItem Base/primary item of preset
|
||||||
* @param preset
|
* @param preset Primary item + children of primary item
|
||||||
* @returns Item array with new IDs
|
* @returns Item array with new IDs
|
||||||
*/
|
*/
|
||||||
reparentPresets(item: Item, preset: Item[]): Item[];
|
reparentPresets(rootItem: Item, preset: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,22 @@ export declare class RepairHelper {
|
|||||||
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
||||||
*/
|
*/
|
||||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
||||||
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
|
||||||
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Is the supplied tpl a weapon
|
* Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material
|
||||||
* @param tpl tplId to check is a weapon
|
* @param armorMaterial What material is the armor being repaired made of
|
||||||
* @returns true if tpl is a weapon
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param armorMax Max amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
*/
|
*/
|
||||||
isWeaponTemplate(tpl: string): boolean;
|
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
||||||
|
/**
|
||||||
|
* Repairing weapons reduces the total durability value slightly, get a randomised (to 2dp) amount
|
||||||
|
* @param itemProps Weapon properties
|
||||||
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param weaponMax ax amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
|
*/
|
||||||
|
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,10 @@ export interface OwnerInventoryItems {
|
|||||||
export declare class SecureContainerHelper {
|
export declare class SecureContainerHelper {
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(itemHelper: ItemHelper);
|
constructor(itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Get an array of the item IDs (NOT tpls) inside a secure container
|
||||||
|
* @param items Inventory items to look for secure container in
|
||||||
|
* @returns Array of ids
|
||||||
|
*/
|
||||||
getSecureContainerItems(items: Item[]): string[];
|
getSecureContainerItems(items: Item[]): string[];
|
||||||
}
|
}
|
||||||
|
@ -53,5 +53,11 @@ export declare class TradeHelper {
|
|||||||
* @param itemsPurchasedCount number of items being bought
|
* @param itemsPurchasedCount number of items being bought
|
||||||
*/
|
*/
|
||||||
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
||||||
|
/**
|
||||||
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
|
* @param assortId Id of assort being purchased
|
||||||
|
* @param count How many are being bought
|
||||||
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ export declare class TraderAssortHelper {
|
|||||||
* Filter out assorts not unlocked due to level OR quest completion
|
* Filter out assorts not unlocked due to level OR quest completion
|
||||||
* @param sessionId session id
|
* @param sessionId session id
|
||||||
* @param traderId traders id
|
* @param traderId traders id
|
||||||
|
* @param flea Should assorts player hasn't unlocked be returned - default false
|
||||||
* @returns a traders' assorts
|
* @returns a traders' assorts
|
||||||
*/
|
*/
|
||||||
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
||||||
|
@ -63,6 +63,12 @@ export declare class TraderHelper {
|
|||||||
* @param traderID trader id to reset
|
* @param traderID trader id to reset
|
||||||
*/
|
*/
|
||||||
resetTrader(sessionID: string, traderID: string): void;
|
resetTrader(sessionID: string, traderID: string): void;
|
||||||
|
/**
|
||||||
|
* Get the starting standing of a trader based on the current profiles type (e.g. EoD, Standard etc)
|
||||||
|
* @param traderId Trader id to get standing for
|
||||||
|
* @param rawProfileTemplate Raw profile from profiles.json to look up standing from
|
||||||
|
* @returns Standing value
|
||||||
|
*/
|
||||||
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
||||||
/**
|
/**
|
||||||
* Alter a traders unlocked status
|
* Alter a traders unlocked status
|
||||||
|
@ -8,6 +8,11 @@ export declare class WeightedRandomHelper {
|
|||||||
getWeightedInventoryItem(itemArray: {
|
getWeightedInventoryItem(itemArray: {
|
||||||
[tplId: string]: unknown;
|
[tplId: string]: unknown;
|
||||||
} | ArrayLike<unknown>): string;
|
} | ArrayLike<unknown>): string;
|
||||||
|
/**
|
||||||
|
* Choos an item from the passed in array based on the weightings of each
|
||||||
|
* @param itemArray Items and weights to use
|
||||||
|
* @returns Chosen item from array
|
||||||
|
*/
|
||||||
getWeightedValue<T>(itemArray: {
|
getWeightedValue<T>(itemArray: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
} | ArrayLike<unknown>): T;
|
} | ArrayLike<unknown>): T;
|
||||||
|
9
TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts
vendored
Normal file
9
TypeScript/10ScopesAndTypes/types/models/eft/inventory/IRedeemProfileRequestData.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||||
|
export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData {
|
||||||
|
Action: "RedeemProfileReward";
|
||||||
|
events: IRedeemProfileRequestEvent[];
|
||||||
|
}
|
||||||
|
export interface IRedeemProfileRequestEvent {
|
||||||
|
MessageId: string;
|
||||||
|
EventId: string;
|
||||||
|
}
|
@ -3,6 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
|||||||
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
||||||
|
import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails";
|
||||||
export interface IAkiProfile {
|
export interface IAkiProfile {
|
||||||
info: Info;
|
info: Info;
|
||||||
characters: Characters;
|
characters: Characters;
|
||||||
@ -95,7 +96,7 @@ export interface Message {
|
|||||||
items?: MessageItems;
|
items?: MessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
export interface MessagePreview {
|
export interface MessagePreview {
|
||||||
uid: string;
|
uid: string;
|
||||||
|
@ -21,7 +21,10 @@ export declare enum Ammo762x54 {
|
|||||||
PS_GZH = "59e77a2386f7742ee578960a",
|
PS_GZH = "59e77a2386f7742ee578960a",
|
||||||
T46M_GZH = "5e023cf8186a883be655e54f",
|
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||||
BT_GZH = "5e023d34e8a400319a28ed44",
|
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||||
BS_GZH = "5e023d48186a883be655e551"
|
BS_GZH = "5e023d48186a883be655e551",
|
||||||
|
FMJ = "64b8f7968532cf95ee0a0dbf",
|
||||||
|
SP_BT = "64b8f7b5389d7ffd620ccba2",
|
||||||
|
HP_BT = "64b8f7c241772715af0f9c3d"
|
||||||
}
|
}
|
||||||
export declare enum Ammo86x70 {
|
export declare enum Ammo86x70 {
|
||||||
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||||
@ -33,7 +36,8 @@ export declare enum Ammo46x30 {
|
|||||||
AP_SX = "5ba26835d4351e0035628ff5",
|
AP_SX = "5ba26835d4351e0035628ff5",
|
||||||
ACTION_SX = "5ba26812d4351e003201fef1",
|
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||||
FMJ_SX = "5ba2678ad4351e44f824b344",
|
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||||
SUBSONIC_SX = "5ba26844d4351e00334c9475"
|
SUBSONIC_SX = "5ba26844d4351e00334c9475",
|
||||||
|
JSP_SX = "64b6979341772715af0f9c39"
|
||||||
}
|
}
|
||||||
export declare enum Ammo57x28 {
|
export declare enum Ammo57x28 {
|
||||||
SS198LF = "5cc80f79e4a949033c7343b2",
|
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||||
@ -77,7 +81,8 @@ export declare enum Ammo9x19 {
|
|||||||
AP_63 = "5c925fa22e221601da359b7b",
|
AP_63 = "5c925fa22e221601da359b7b",
|
||||||
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||||
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||||
QUAKEMAKER = "5efb0e16aeb21837e749c7ff"
|
QUAKEMAKER = "5efb0e16aeb21837e749c7ff",
|
||||||
|
FMJ_M882 = "64b7bbb74b75259c590fa897"
|
||||||
}
|
}
|
||||||
export declare enum Ammo9x21 {
|
export declare enum Ammo9x21 {
|
||||||
P_GZH = "5a26abfac4a28232980eabff",
|
P_GZH = "5a26abfac4a28232980eabff",
|
||||||
@ -131,7 +136,8 @@ export declare enum Ammo762x35 {
|
|||||||
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||||
AP = "5fd20ff893a8961fc660a954",
|
AP = "5fd20ff893a8961fc660a954",
|
||||||
V_MAX = "6196364158ef8c428c287d9f",
|
V_MAX = "6196364158ef8c428c287d9f",
|
||||||
WHISPER = "6196365d58ef8c428c287da1"
|
WHISPER = "6196365d58ef8c428c287da1",
|
||||||
|
CBJ = "64b8725c4b75259c590fa899"
|
||||||
}
|
}
|
||||||
export declare enum Ammo762x39 {
|
export declare enum Ammo762x39 {
|
||||||
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||||
@ -139,7 +145,10 @@ export declare enum Ammo762x39 {
|
|||||||
US_GZH = "59e4d24686f7741776641ac7",
|
US_GZH = "59e4d24686f7741776641ac7",
|
||||||
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||||
BP_GZH = "59e0d99486f7744a32234762",
|
BP_GZH = "59e0d99486f7744a32234762",
|
||||||
MAI_AP = "601aa3d2b2bcb34913271e6d"
|
MAI_AP = "601aa3d2b2bcb34913271e6d",
|
||||||
|
PP_GZH = "64b7af434b75259c590fa893",
|
||||||
|
SP = "64b7af734b75259c590fa895",
|
||||||
|
FMJ = "64b7af5a8532cf95ee0a0dbd"
|
||||||
}
|
}
|
||||||
export declare enum Ammo9x39 {
|
export declare enum Ammo9x39 {
|
||||||
SP5_GS = "57a0dfb82459774d3078b56c",
|
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||||
@ -175,7 +184,8 @@ export declare enum Ammo12Gauge {
|
|||||||
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||||
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||||
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||||
LEAD_SLUG = "58820d1224597753c90aeb13"
|
LEAD_SLUG = "58820d1224597753c90aeb13",
|
||||||
|
PIRANHA = "64b8ee384b75259c590fa89b"
|
||||||
}
|
}
|
||||||
export declare enum Ammo20Gauge {
|
export declare enum Ammo20Gauge {
|
||||||
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||||
|
@ -2,5 +2,6 @@ export declare enum ItemAddedResult {
|
|||||||
UNKNOWN = -1,
|
UNKNOWN = -1,
|
||||||
SUCCESS = 1,
|
SUCCESS = 1,
|
||||||
NO_SPACE = 2,
|
NO_SPACE = 2,
|
||||||
NO_CONTAINERS = 3
|
NO_CONTAINERS = 3,
|
||||||
|
INCOMPATIBLE_ITEM = 4
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,6 @@ export declare enum ItemEventActions {
|
|||||||
REMOVE_WEAPON_BUILD = "RemoveWeaponBuild",
|
REMOVE_WEAPON_BUILD = "RemoveWeaponBuild",
|
||||||
REMOVE_BUILD = "RemoveBuild",
|
REMOVE_BUILD = "RemoveBuild",
|
||||||
SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild",
|
SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild",
|
||||||
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild"
|
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild",
|
||||||
|
REDEEM_PROFILE_REWARD = "RedeemProfileReward"
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { GiftSenderType } from "@spt-aki/models/enums/GiftSenderType";
|
|||||||
import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType";
|
import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType";
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||||
|
import { IProfileChangeEvent } from "../dialog/ISendMessageDetails";
|
||||||
export interface IGiftsConfig extends IBaseConfig {
|
export interface IGiftsConfig extends IBaseConfig {
|
||||||
kind: "aki-gifts";
|
kind: "aki-gifts";
|
||||||
gifts: Record<string, Gift>;
|
gifts: Record<string, Gift>;
|
||||||
@ -25,4 +26,6 @@ export interface Gift {
|
|||||||
timestampToSend?: number;
|
timestampToSend?: number;
|
||||||
associatedEvent: SeasonalEventType;
|
associatedEvent: SeasonalEventType;
|
||||||
collectionTimeHours: number;
|
collectionTimeHours: number;
|
||||||
|
/** Optional, can be used to change profile settings like level/skills */
|
||||||
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,18 @@ export interface Sell {
|
|||||||
time: Time;
|
time: Time;
|
||||||
/** Player offer reputation gain/loss settings */
|
/** Player offer reputation gain/loss settings */
|
||||||
reputation: Reputation;
|
reputation: Reputation;
|
||||||
/** How many hours are simulated to figure out if player offer was sold */
|
|
||||||
simulatedSellHours: number;
|
|
||||||
/**Seconds from clicking remove to remove offer from market */
|
/**Seconds from clicking remove to remove offer from market */
|
||||||
expireSeconds: number;
|
expireSeconds: number;
|
||||||
}
|
}
|
||||||
export interface Chance {
|
export interface Chance {
|
||||||
|
/** Base chance percent to sell an item */
|
||||||
base: number;
|
base: number;
|
||||||
overpriced: number;
|
/** Value to multiply the sell chance by */
|
||||||
underpriced: number;
|
sellMultiplier: number;
|
||||||
|
/** Max possible sell chance % for a player listed offer */
|
||||||
|
maxSellChancePercent: number;
|
||||||
|
/** Min possible sell chance % for a player listed offer */
|
||||||
|
minSellChancePercent: number;
|
||||||
}
|
}
|
||||||
export interface Time extends MinMax {
|
export interface Time extends MinMax {
|
||||||
base: number;
|
base: number;
|
||||||
@ -129,7 +132,7 @@ export interface Blacklist {
|
|||||||
enableBsgList: boolean;
|
enableBsgList: boolean;
|
||||||
/** Should quest items be blacklisted from flea */
|
/** Should quest items be blacklisted from flea */
|
||||||
enableQuestList: boolean;
|
enableQuestList: boolean;
|
||||||
/** Should trader items that are blacklisted by bsg */
|
/** Should trader items that are blacklisted by bsg be listed on flea */
|
||||||
traderItems: boolean;
|
traderItems: boolean;
|
||||||
}
|
}
|
||||||
export interface IUnreasonableModPrices {
|
export interface IUnreasonableModPrices {
|
||||||
|
@ -25,6 +25,12 @@ export interface ISendMessageDetails {
|
|||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
/** Optional - Used by ragfair messages */
|
/** Optional - Used by ragfair messages */
|
||||||
ragfairDetails?: MessageContentRagfair;
|
ragfairDetails?: MessageContentRagfair;
|
||||||
/** Optional - Usage not known, unsure of purpose, even dumps dont have it */
|
/** OPTIONAL - allows modification of profile settings via mail */
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
|
}
|
||||||
|
export interface IProfileChangeEvent {
|
||||||
|
_id: string;
|
||||||
|
Type: "TraderSalesSum" | "TraderStanding" | "ProfileLevel" | "SkillPoints" | "ExamineAllItems" | "UnlockTrader";
|
||||||
|
value: number;
|
||||||
|
entity?: string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator
|
|||||||
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -27,9 +28,8 @@ export declare class RagfairServer {
|
|||||||
* Get traders who need to be periodically refreshed
|
* Get traders who need to be periodically refreshed
|
||||||
* @returns string array of traders
|
* @returns string array of traders
|
||||||
*/
|
*/
|
||||||
protected getUpdateableTraders(): string[];
|
getUpdateableTraders(): string[];
|
||||||
getAllCategories(): Record<string, number>;
|
getAllActiveCategories(fleaUnlocked: boolean, searchRequestData: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
/**
|
||||||
* Disable/Hide an offer from flea
|
* Disable/Hide an offer from flea
|
||||||
* @param offerId
|
* @param offerId
|
||||||
|
@ -9,6 +9,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
export declare class WebSocketServer {
|
export declare class WebSocketServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
@ -16,7 +17,8 @@ export declare class WebSocketServer {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper);
|
protected profileHelper: ProfileHelper;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper);
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected defaultNotification: INotification;
|
protected defaultNotification: INotification;
|
||||||
protected webSockets: Record<string, WebSocket.WebSocket>;
|
protected webSockets: Record<string, WebSocket.WebSocket>;
|
||||||
|
@ -63,7 +63,7 @@ export declare class MailSendService {
|
|||||||
* @param items Optional items to send to player
|
* @param items Optional items to send to player
|
||||||
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
*/
|
*/
|
||||||
sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], profileChangeEvents?: any[], maxStorageTimeSeconds?: any): void;
|
||||||
/**
|
/**
|
||||||
* Send a USER message to a player with or without items
|
* Send a USER message to a player with or without items
|
||||||
* @param sessionId The session ID to send the message to
|
* @param sessionId The session ID to send the message to
|
||||||
|
@ -1,40 +1,17 @@
|
|||||||
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
export declare class RagfairCategoriesService {
|
export declare class RagfairCategoriesService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected categories: Record<string, number>;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger);
|
constructor(logger: ILogger, paymentHelper: PaymentHelper);
|
||||||
/**
|
/**
|
||||||
* Get all flea categories and their count of offers
|
* Get a dictionary of each item the play can see in their flea menu, filtered by what is available for them to buy
|
||||||
* @returns item categories and count
|
* @param offers All offers in flea
|
||||||
|
* @param searchRequestData Search criteria requested
|
||||||
|
* @param fleaUnlocked Can player see full flea yet (level 15 by default)
|
||||||
|
* @returns KVP of item tpls + count of offers
|
||||||
*/
|
*/
|
||||||
getAllCategories(): Record<string, number>;
|
getCategoriesFromOffers(offers: IRagfairOffer[], searchRequestData: ISearchRequestData, fleaUnlocked: boolean): Record<string, number>;
|
||||||
/**
|
|
||||||
* With the supplied items, get custom categories
|
|
||||||
* @returns a custom list of categories
|
|
||||||
*/
|
|
||||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Take an array of ragfair offers and create a dictionary of items with thier corrisponding offer count
|
|
||||||
* @param offers ragfair offers
|
|
||||||
* @returns categories and count
|
|
||||||
*/
|
|
||||||
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Increment or decrement a category array
|
|
||||||
* @param offer Offer to process
|
|
||||||
* @param categories Categories to update
|
|
||||||
* @param increment (Optional) Should item be incremented or decremented
|
|
||||||
*/
|
|
||||||
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
|
|
||||||
/**
|
|
||||||
* Increase category count by 1
|
|
||||||
* @param offer
|
|
||||||
*/
|
|
||||||
incrementCategory(offer: IRagfairOffer): void;
|
|
||||||
/**
|
|
||||||
* Reduce category count by 1
|
|
||||||
* @param offer
|
|
||||||
*/
|
|
||||||
decrementCategory(offer: IRagfairOffer): void;
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder";
|
import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -20,7 +19,6 @@ export declare class RagfairOfferService {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
@ -30,7 +28,7 @@ export declare class RagfairOfferService {
|
|||||||
protected expiredOffers: Record<string, IRagfairOffer>;
|
protected expiredOffers: Record<string, IRagfairOffer>;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected ragfairOfferHandler: RagfairOfferHolder;
|
protected ragfairOfferHandler: RagfairOfferHolder;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get all offers
|
* Get all offers
|
||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
|
@ -56,6 +56,7 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
protected getIntellectGainedFromRepair(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
* @param repairDetails the repair details to calculate skill points for
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
@ -12,7 +12,7 @@ export declare class BundleCallbacks {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/bundles
|
* Handle singleplayer/bundles
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullRespons
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class GameCallbacks implements OnLoad {
|
export declare class GameCallbacks implements OnLoad {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -75,4 +75,3 @@ declare class GameCallbacks implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
||||||
}
|
}
|
||||||
export { GameCallbacks };
|
|
||||||
|
@ -17,6 +17,7 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
@ -46,4 +47,5 @@ export declare class InventoryCallbacks {
|
|||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle OpenRandomLootContainer */
|
/** Handle OpenRandomLootContainer */
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileD
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class LauncherCallbacks {
|
export declare class LauncherCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected launcherController: LauncherController;
|
protected launcherController: LauncherController;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -27,4 +27,3 @@ declare class LauncherCallbacks {
|
|||||||
getLoadedServerMods(): string;
|
getLoadedServerMods(): string;
|
||||||
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
}
|
}
|
||||||
export { LauncherCallbacks };
|
|
||||||
|
@ -6,7 +6,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks implements OnLoad {
|
export declare class ModCallbacks implements OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
@ -18,4 +18,3 @@ declare class ModCallbacks implements OnLoad {
|
|||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
export { ModCallbacks };
|
|
||||||
|
@ -23,12 +23,14 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
|
import { PlayerService } from "@spt-aki/services/PlayerService";
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -49,10 +51,11 @@ export declare class InventoryController {
|
|||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected playerService: PlayerService;
|
||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
@ -162,6 +165,7 @@ export declare class InventoryController {
|
|||||||
* @returns response
|
* @returns response
|
||||||
*/
|
*/
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get the tplid of an item from the examine request object
|
* Get the tplid of an item from the examine request object
|
||||||
* @param body response request
|
* @param body response request
|
||||||
@ -217,4 +221,5 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export declare class RagfairController {
|
|||||||
* @param offers ragfair offers to get categories for
|
* @param offers ragfair offers to get categories for
|
||||||
* @returns record with tpls + counts
|
* @returns record with tpls + counts
|
||||||
*/
|
*/
|
||||||
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Add Required offers to offers result
|
* Add Required offers to offers result
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
|
@ -61,7 +61,9 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} sessionId Player's session id
|
* @param {string} _info Request from client
|
||||||
|
* @param {string} sessionID Player's session id
|
||||||
|
*
|
||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
@ -20,7 +20,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class TradeController {
|
export declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
@ -63,4 +63,3 @@ declare class TradeController {
|
|||||||
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
||||||
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
export { TradeController };
|
|
||||||
|
@ -15,7 +15,6 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService";
|
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -38,7 +37,6 @@ export declare class RagfairOfferGenerator {
|
|||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
@ -47,7 +45,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
tpl: string;
|
tpl: string;
|
||||||
price: number;
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
* @param userID Owner of the offer
|
* @param userID Owner of the offer
|
||||||
|
@ -77,10 +77,10 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
*/
|
*/
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
||||||
/**
|
/**
|
||||||
* is the provided item allowed inside a container
|
* Is the provided item allowed inside a container
|
||||||
* @param slot location item wants to be placed in
|
* @param slotGrid Items sub-grid we want to place item inside
|
||||||
* @param itemTpl item being placed
|
* @param itemTpl Item tpl being placed
|
||||||
* @returns true if allowed
|
* @returns True if allowed
|
||||||
*/
|
*/
|
||||||
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
|
protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class LookupItem<T, I> {
|
declare class LookupItem<T, I> {
|
||||||
@ -59,5 +60,6 @@ export declare class HandbookHelper {
|
|||||||
* @returns currency count in desired type
|
* @returns currency count in desired type
|
||||||
*/
|
*/
|
||||||
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
||||||
|
getCategoryById(handbookId: string): Category;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -15,9 +15,11 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
@ -31,7 +33,7 @@ export declare class InRaidHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
protected inRaidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
* @returns True if items should be removed from inventory
|
* @returns True if items should be removed from inventory
|
||||||
@ -60,7 +62,6 @@ export declare class InRaidHelper {
|
|||||||
* Reset a profile to a baseline, used post-raid
|
* Reset a profile to a baseline, used post-raid
|
||||||
* Reset points earned during session property
|
* Reset points earned during session property
|
||||||
* Increment exp
|
* Increment exp
|
||||||
* Remove Labs keycard
|
|
||||||
* @param profileData Profile to update
|
* @param profileData Profile to update
|
||||||
* @param saveProgressRequest post raid save data request data
|
* @param saveProgressRequest post raid save data request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -89,13 +90,13 @@ export declare class InRaidHelper {
|
|||||||
*/
|
*/
|
||||||
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Look for quests with status = fail that were not failed pre-raid and run the failQuest() function
|
* Look for quests with a status different from what it began the raid with
|
||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param preRaidQuests Quests prior to starting raid
|
* @param preRaidQuests Quests prior to starting raid
|
||||||
* @param postRaidProfile Profile sent by client
|
* @param postRaidProfile Profile sent by client with post-raid quests
|
||||||
*/
|
*/
|
||||||
protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
protected processAlteredQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Take body part effects from client profile and apply to server profile
|
* Take body part effects from client profile and apply to server profile
|
||||||
* @param saveProgressRequest post-raid request
|
* @param saveProgressRequest post-raid request
|
||||||
|
@ -15,7 +15,7 @@ import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
|||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
declare class ItemHelper {
|
export declare class ItemHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -355,4 +355,4 @@ declare namespace ItemHelper {
|
|||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export { ItemHelper };
|
export {};
|
||||||
|
@ -4,7 +4,6 @@ import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
|||||||
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult";
|
|
||||||
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,14 +29,19 @@ export declare class RagfairHelper {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getCurrencyTag(currency: string): string;
|
getCurrencyTag(currency: string): string;
|
||||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
filterCategories(sessionID: string, request: ISearchRequestData): string[];
|
||||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||||
protected getCategoryList(handbookId: string): string[];
|
protected getCategoryList(handbookId: string): string[];
|
||||||
countCategories(result: IGetOffersResult): void;
|
|
||||||
/**
|
/**
|
||||||
* Merges Root Items
|
* Merges Root Items
|
||||||
* Ragfair allows abnormally large stacks.
|
* Ragfair allows abnormally large stacks.
|
||||||
*/
|
*/
|
||||||
mergeStackable(items: Item[]): Item[];
|
mergeStackable(items: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Return the symbol for a currency
|
||||||
|
* e.g. 5449016a4bdc2d6f028b456f return ₽
|
||||||
|
* @param currencyTpl currency to get symbol for
|
||||||
|
* @returns symbol of currency
|
||||||
|
*/
|
||||||
getCurrencySymbol(currencyTpl: string): string;
|
getCurrencySymbol(currencyTpl: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,17 @@ import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
|||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RagfairSellHelper {
|
export declare class RagfairSellHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
* @param averageOfferPriceRub Price of average offer in roubles
|
||||||
@ -19,13 +21,6 @@ export declare class RagfairSellHelper {
|
|||||||
* @returns percent value
|
* @returns percent value
|
||||||
*/
|
*/
|
||||||
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
||||||
/**
|
|
||||||
* Get percent chance to sell an item when price is below items average listing price
|
|
||||||
* @param playerListedPriceRub Price player listed item for in roubles
|
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
|
||||||
* @returns percent value
|
|
||||||
*/
|
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Get array of item count and sell time (empty array = no sell)
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
@ -21,6 +22,7 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
|||||||
* Helper class for common ragfair server actions
|
* Helper class for common ragfair server actions
|
||||||
*/
|
*/
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -38,7 +40,7 @@ export declare class RagfairServerHelper {
|
|||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected static goodsReturnedTemplate: string;
|
protected static goodsReturnedTemplate: string;
|
||||||
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Is item valid / on blacklist / quest item
|
* Is item valid / on blacklist / quest item
|
||||||
* @param itemDetails
|
* @param itemDetails
|
||||||
@ -76,14 +78,29 @@ export declare class RagfairServerHelper {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferCurrency(): string;
|
getDynamicOfferCurrency(): string;
|
||||||
getMemberType(userID: string): MemberCategory;
|
getMemberType(userID: string): MemberCategory;
|
||||||
|
/**
|
||||||
|
* Get a player or traders nickname from their profile by their user id
|
||||||
|
* @param userID Sessionid/userid
|
||||||
|
* @returns Nickname of individual
|
||||||
|
*/
|
||||||
getNickname(userID: string): string;
|
getNickname(userID: string): string;
|
||||||
getPresetItems(item: any): Item[];
|
/**
|
||||||
|
* Given a preset id from globals.json, return an array of items[] with unique ids
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns Array of weapon and its children
|
||||||
|
*/
|
||||||
|
getPresetItems(item: Item): Item[];
|
||||||
|
/**
|
||||||
|
* Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getPresetItemsByTpl(item: Item): Item[];
|
getPresetItemsByTpl(item: Item): Item[];
|
||||||
/**
|
/**
|
||||||
* Generate new unique ids for the children while preserving hierarchy
|
* Generate new unique ids for child items while preserving hierarchy
|
||||||
* @param item base item
|
* @param rootItem Base/primary item of preset
|
||||||
* @param preset
|
* @param preset Primary item + children of primary item
|
||||||
* @returns Item array with new IDs
|
* @returns Item array with new IDs
|
||||||
*/
|
*/
|
||||||
reparentPresets(item: Item, preset: Item[]): Item[];
|
reparentPresets(rootItem: Item, preset: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,22 @@ export declare class RepairHelper {
|
|||||||
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
||||||
*/
|
*/
|
||||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
||||||
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
|
||||||
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Is the supplied tpl a weapon
|
* Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material
|
||||||
* @param tpl tplId to check is a weapon
|
* @param armorMaterial What material is the armor being repaired made of
|
||||||
* @returns true if tpl is a weapon
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param armorMax Max amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
*/
|
*/
|
||||||
isWeaponTemplate(tpl: string): boolean;
|
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
||||||
|
/**
|
||||||
|
* Repairing weapons reduces the total durability value slightly, get a randomised (to 2dp) amount
|
||||||
|
* @param itemProps Weapon properties
|
||||||
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param weaponMax ax amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
|
*/
|
||||||
|
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,10 @@ export interface OwnerInventoryItems {
|
|||||||
export declare class SecureContainerHelper {
|
export declare class SecureContainerHelper {
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(itemHelper: ItemHelper);
|
constructor(itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Get an array of the item IDs (NOT tpls) inside a secure container
|
||||||
|
* @param items Inventory items to look for secure container in
|
||||||
|
* @returns Array of ids
|
||||||
|
*/
|
||||||
getSecureContainerItems(items: Item[]): string[];
|
getSecureContainerItems(items: Item[]): string[];
|
||||||
}
|
}
|
||||||
|
@ -53,5 +53,11 @@ export declare class TradeHelper {
|
|||||||
* @param itemsPurchasedCount number of items being bought
|
* @param itemsPurchasedCount number of items being bought
|
||||||
*/
|
*/
|
||||||
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
||||||
|
/**
|
||||||
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
|
* @param assortId Id of assort being purchased
|
||||||
|
* @param count How many are being bought
|
||||||
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ export declare class TraderAssortHelper {
|
|||||||
* Filter out assorts not unlocked due to level OR quest completion
|
* Filter out assorts not unlocked due to level OR quest completion
|
||||||
* @param sessionId session id
|
* @param sessionId session id
|
||||||
* @param traderId traders id
|
* @param traderId traders id
|
||||||
|
* @param flea Should assorts player hasn't unlocked be returned - default false
|
||||||
* @returns a traders' assorts
|
* @returns a traders' assorts
|
||||||
*/
|
*/
|
||||||
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
||||||
|
@ -63,6 +63,12 @@ export declare class TraderHelper {
|
|||||||
* @param traderID trader id to reset
|
* @param traderID trader id to reset
|
||||||
*/
|
*/
|
||||||
resetTrader(sessionID: string, traderID: string): void;
|
resetTrader(sessionID: string, traderID: string): void;
|
||||||
|
/**
|
||||||
|
* Get the starting standing of a trader based on the current profiles type (e.g. EoD, Standard etc)
|
||||||
|
* @param traderId Trader id to get standing for
|
||||||
|
* @param rawProfileTemplate Raw profile from profiles.json to look up standing from
|
||||||
|
* @returns Standing value
|
||||||
|
*/
|
||||||
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
||||||
/**
|
/**
|
||||||
* Alter a traders unlocked status
|
* Alter a traders unlocked status
|
||||||
|
@ -8,6 +8,11 @@ export declare class WeightedRandomHelper {
|
|||||||
getWeightedInventoryItem(itemArray: {
|
getWeightedInventoryItem(itemArray: {
|
||||||
[tplId: string]: unknown;
|
[tplId: string]: unknown;
|
||||||
} | ArrayLike<unknown>): string;
|
} | ArrayLike<unknown>): string;
|
||||||
|
/**
|
||||||
|
* Choos an item from the passed in array based on the weightings of each
|
||||||
|
* @param itemArray Items and weights to use
|
||||||
|
* @returns Chosen item from array
|
||||||
|
*/
|
||||||
getWeightedValue<T>(itemArray: {
|
getWeightedValue<T>(itemArray: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
} | ArrayLike<unknown>): T;
|
} | ArrayLike<unknown>): T;
|
||||||
|
9
TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts
vendored
Normal file
9
TypeScript/11BundleLoadingSample/types/models/eft/inventory/IRedeemProfileRequestData.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||||
|
export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData {
|
||||||
|
Action: "RedeemProfileReward";
|
||||||
|
events: IRedeemProfileRequestEvent[];
|
||||||
|
}
|
||||||
|
export interface IRedeemProfileRequestEvent {
|
||||||
|
MessageId: string;
|
||||||
|
EventId: string;
|
||||||
|
}
|
@ -3,6 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
|||||||
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
||||||
|
import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails";
|
||||||
export interface IAkiProfile {
|
export interface IAkiProfile {
|
||||||
info: Info;
|
info: Info;
|
||||||
characters: Characters;
|
characters: Characters;
|
||||||
@ -95,7 +96,7 @@ export interface Message {
|
|||||||
items?: MessageItems;
|
items?: MessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
export interface MessagePreview {
|
export interface MessagePreview {
|
||||||
uid: string;
|
uid: string;
|
||||||
|
@ -21,7 +21,10 @@ export declare enum Ammo762x54 {
|
|||||||
PS_GZH = "59e77a2386f7742ee578960a",
|
PS_GZH = "59e77a2386f7742ee578960a",
|
||||||
T46M_GZH = "5e023cf8186a883be655e54f",
|
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||||
BT_GZH = "5e023d34e8a400319a28ed44",
|
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||||
BS_GZH = "5e023d48186a883be655e551"
|
BS_GZH = "5e023d48186a883be655e551",
|
||||||
|
FMJ = "64b8f7968532cf95ee0a0dbf",
|
||||||
|
SP_BT = "64b8f7b5389d7ffd620ccba2",
|
||||||
|
HP_BT = "64b8f7c241772715af0f9c3d"
|
||||||
}
|
}
|
||||||
export declare enum Ammo86x70 {
|
export declare enum Ammo86x70 {
|
||||||
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||||
@ -33,7 +36,8 @@ export declare enum Ammo46x30 {
|
|||||||
AP_SX = "5ba26835d4351e0035628ff5",
|
AP_SX = "5ba26835d4351e0035628ff5",
|
||||||
ACTION_SX = "5ba26812d4351e003201fef1",
|
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||||
FMJ_SX = "5ba2678ad4351e44f824b344",
|
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||||
SUBSONIC_SX = "5ba26844d4351e00334c9475"
|
SUBSONIC_SX = "5ba26844d4351e00334c9475",
|
||||||
|
JSP_SX = "64b6979341772715af0f9c39"
|
||||||
}
|
}
|
||||||
export declare enum Ammo57x28 {
|
export declare enum Ammo57x28 {
|
||||||
SS198LF = "5cc80f79e4a949033c7343b2",
|
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||||
@ -77,7 +81,8 @@ export declare enum Ammo9x19 {
|
|||||||
AP_63 = "5c925fa22e221601da359b7b",
|
AP_63 = "5c925fa22e221601da359b7b",
|
||||||
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||||
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||||
QUAKEMAKER = "5efb0e16aeb21837e749c7ff"
|
QUAKEMAKER = "5efb0e16aeb21837e749c7ff",
|
||||||
|
FMJ_M882 = "64b7bbb74b75259c590fa897"
|
||||||
}
|
}
|
||||||
export declare enum Ammo9x21 {
|
export declare enum Ammo9x21 {
|
||||||
P_GZH = "5a26abfac4a28232980eabff",
|
P_GZH = "5a26abfac4a28232980eabff",
|
||||||
@ -131,7 +136,8 @@ export declare enum Ammo762x35 {
|
|||||||
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||||
AP = "5fd20ff893a8961fc660a954",
|
AP = "5fd20ff893a8961fc660a954",
|
||||||
V_MAX = "6196364158ef8c428c287d9f",
|
V_MAX = "6196364158ef8c428c287d9f",
|
||||||
WHISPER = "6196365d58ef8c428c287da1"
|
WHISPER = "6196365d58ef8c428c287da1",
|
||||||
|
CBJ = "64b8725c4b75259c590fa899"
|
||||||
}
|
}
|
||||||
export declare enum Ammo762x39 {
|
export declare enum Ammo762x39 {
|
||||||
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||||
@ -139,7 +145,10 @@ export declare enum Ammo762x39 {
|
|||||||
US_GZH = "59e4d24686f7741776641ac7",
|
US_GZH = "59e4d24686f7741776641ac7",
|
||||||
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||||
BP_GZH = "59e0d99486f7744a32234762",
|
BP_GZH = "59e0d99486f7744a32234762",
|
||||||
MAI_AP = "601aa3d2b2bcb34913271e6d"
|
MAI_AP = "601aa3d2b2bcb34913271e6d",
|
||||||
|
PP_GZH = "64b7af434b75259c590fa893",
|
||||||
|
SP = "64b7af734b75259c590fa895",
|
||||||
|
FMJ = "64b7af5a8532cf95ee0a0dbd"
|
||||||
}
|
}
|
||||||
export declare enum Ammo9x39 {
|
export declare enum Ammo9x39 {
|
||||||
SP5_GS = "57a0dfb82459774d3078b56c",
|
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||||
@ -175,7 +184,8 @@ export declare enum Ammo12Gauge {
|
|||||||
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||||
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||||
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||||
LEAD_SLUG = "58820d1224597753c90aeb13"
|
LEAD_SLUG = "58820d1224597753c90aeb13",
|
||||||
|
PIRANHA = "64b8ee384b75259c590fa89b"
|
||||||
}
|
}
|
||||||
export declare enum Ammo20Gauge {
|
export declare enum Ammo20Gauge {
|
||||||
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||||
|
@ -2,5 +2,6 @@ export declare enum ItemAddedResult {
|
|||||||
UNKNOWN = -1,
|
UNKNOWN = -1,
|
||||||
SUCCESS = 1,
|
SUCCESS = 1,
|
||||||
NO_SPACE = 2,
|
NO_SPACE = 2,
|
||||||
NO_CONTAINERS = 3
|
NO_CONTAINERS = 3,
|
||||||
|
INCOMPATIBLE_ITEM = 4
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,6 @@ export declare enum ItemEventActions {
|
|||||||
REMOVE_WEAPON_BUILD = "RemoveWeaponBuild",
|
REMOVE_WEAPON_BUILD = "RemoveWeaponBuild",
|
||||||
REMOVE_BUILD = "RemoveBuild",
|
REMOVE_BUILD = "RemoveBuild",
|
||||||
SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild",
|
SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild",
|
||||||
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild"
|
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild",
|
||||||
|
REDEEM_PROFILE_REWARD = "RedeemProfileReward"
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { GiftSenderType } from "@spt-aki/models/enums/GiftSenderType";
|
|||||||
import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType";
|
import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType";
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||||
|
import { IProfileChangeEvent } from "../dialog/ISendMessageDetails";
|
||||||
export interface IGiftsConfig extends IBaseConfig {
|
export interface IGiftsConfig extends IBaseConfig {
|
||||||
kind: "aki-gifts";
|
kind: "aki-gifts";
|
||||||
gifts: Record<string, Gift>;
|
gifts: Record<string, Gift>;
|
||||||
@ -25,4 +26,6 @@ export interface Gift {
|
|||||||
timestampToSend?: number;
|
timestampToSend?: number;
|
||||||
associatedEvent: SeasonalEventType;
|
associatedEvent: SeasonalEventType;
|
||||||
collectionTimeHours: number;
|
collectionTimeHours: number;
|
||||||
|
/** Optional, can be used to change profile settings like level/skills */
|
||||||
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,18 @@ export interface Sell {
|
|||||||
time: Time;
|
time: Time;
|
||||||
/** Player offer reputation gain/loss settings */
|
/** Player offer reputation gain/loss settings */
|
||||||
reputation: Reputation;
|
reputation: Reputation;
|
||||||
/** How many hours are simulated to figure out if player offer was sold */
|
|
||||||
simulatedSellHours: number;
|
|
||||||
/**Seconds from clicking remove to remove offer from market */
|
/**Seconds from clicking remove to remove offer from market */
|
||||||
expireSeconds: number;
|
expireSeconds: number;
|
||||||
}
|
}
|
||||||
export interface Chance {
|
export interface Chance {
|
||||||
|
/** Base chance percent to sell an item */
|
||||||
base: number;
|
base: number;
|
||||||
overpriced: number;
|
/** Value to multiply the sell chance by */
|
||||||
underpriced: number;
|
sellMultiplier: number;
|
||||||
|
/** Max possible sell chance % for a player listed offer */
|
||||||
|
maxSellChancePercent: number;
|
||||||
|
/** Min possible sell chance % for a player listed offer */
|
||||||
|
minSellChancePercent: number;
|
||||||
}
|
}
|
||||||
export interface Time extends MinMax {
|
export interface Time extends MinMax {
|
||||||
base: number;
|
base: number;
|
||||||
@ -129,7 +132,7 @@ export interface Blacklist {
|
|||||||
enableBsgList: boolean;
|
enableBsgList: boolean;
|
||||||
/** Should quest items be blacklisted from flea */
|
/** Should quest items be blacklisted from flea */
|
||||||
enableQuestList: boolean;
|
enableQuestList: boolean;
|
||||||
/** Should trader items that are blacklisted by bsg */
|
/** Should trader items that are blacklisted by bsg be listed on flea */
|
||||||
traderItems: boolean;
|
traderItems: boolean;
|
||||||
}
|
}
|
||||||
export interface IUnreasonableModPrices {
|
export interface IUnreasonableModPrices {
|
||||||
|
@ -25,6 +25,12 @@ export interface ISendMessageDetails {
|
|||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
/** Optional - Used by ragfair messages */
|
/** Optional - Used by ragfair messages */
|
||||||
ragfairDetails?: MessageContentRagfair;
|
ragfairDetails?: MessageContentRagfair;
|
||||||
/** Optional - Usage not known, unsure of purpose, even dumps dont have it */
|
/** OPTIONAL - allows modification of profile settings via mail */
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
|
}
|
||||||
|
export interface IProfileChangeEvent {
|
||||||
|
_id: string;
|
||||||
|
Type: "TraderSalesSum" | "TraderStanding" | "ProfileLevel" | "SkillPoints" | "ExamineAllItems" | "UnlockTrader";
|
||||||
|
value: number;
|
||||||
|
entity?: string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator
|
|||||||
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -27,9 +28,8 @@ export declare class RagfairServer {
|
|||||||
* Get traders who need to be periodically refreshed
|
* Get traders who need to be periodically refreshed
|
||||||
* @returns string array of traders
|
* @returns string array of traders
|
||||||
*/
|
*/
|
||||||
protected getUpdateableTraders(): string[];
|
getUpdateableTraders(): string[];
|
||||||
getAllCategories(): Record<string, number>;
|
getAllActiveCategories(fleaUnlocked: boolean, searchRequestData: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
/**
|
||||||
* Disable/Hide an offer from flea
|
* Disable/Hide an offer from flea
|
||||||
* @param offerId
|
* @param offerId
|
||||||
|
@ -9,6 +9,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
export declare class WebSocketServer {
|
export declare class WebSocketServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
@ -16,7 +17,8 @@ export declare class WebSocketServer {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper);
|
protected profileHelper: ProfileHelper;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper);
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected defaultNotification: INotification;
|
protected defaultNotification: INotification;
|
||||||
protected webSockets: Record<string, WebSocket.WebSocket>;
|
protected webSockets: Record<string, WebSocket.WebSocket>;
|
||||||
|
@ -63,7 +63,7 @@ export declare class MailSendService {
|
|||||||
* @param items Optional items to send to player
|
* @param items Optional items to send to player
|
||||||
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
* @param maxStorageTimeSeconds Optional time to collect items before they expire
|
||||||
*/
|
*/
|
||||||
sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], maxStorageTimeSeconds?: any): void;
|
sendLocalisedSystemMessageToPlayer(sessionId: string, messageLocaleId: string, items?: Item[], profileChangeEvents?: any[], maxStorageTimeSeconds?: any): void;
|
||||||
/**
|
/**
|
||||||
* Send a USER message to a player with or without items
|
* Send a USER message to a player with or without items
|
||||||
* @param sessionId The session ID to send the message to
|
* @param sessionId The session ID to send the message to
|
||||||
|
@ -1,40 +1,17 @@
|
|||||||
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
export declare class RagfairCategoriesService {
|
export declare class RagfairCategoriesService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected categories: Record<string, number>;
|
protected paymentHelper: PaymentHelper;
|
||||||
constructor(logger: ILogger);
|
constructor(logger: ILogger, paymentHelper: PaymentHelper);
|
||||||
/**
|
/**
|
||||||
* Get all flea categories and their count of offers
|
* Get a dictionary of each item the play can see in their flea menu, filtered by what is available for them to buy
|
||||||
* @returns item categories and count
|
* @param offers All offers in flea
|
||||||
|
* @param searchRequestData Search criteria requested
|
||||||
|
* @param fleaUnlocked Can player see full flea yet (level 15 by default)
|
||||||
|
* @returns KVP of item tpls + count of offers
|
||||||
*/
|
*/
|
||||||
getAllCategories(): Record<string, number>;
|
getCategoriesFromOffers(offers: IRagfairOffer[], searchRequestData: ISearchRequestData, fleaUnlocked: boolean): Record<string, number>;
|
||||||
/**
|
|
||||||
* With the supplied items, get custom categories
|
|
||||||
* @returns a custom list of categories
|
|
||||||
*/
|
|
||||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Take an array of ragfair offers and create a dictionary of items with thier corrisponding offer count
|
|
||||||
* @param offers ragfair offers
|
|
||||||
* @returns categories and count
|
|
||||||
*/
|
|
||||||
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
|
|
||||||
/**
|
|
||||||
* Increment or decrement a category array
|
|
||||||
* @param offer Offer to process
|
|
||||||
* @param categories Categories to update
|
|
||||||
* @param increment (Optional) Should item be incremented or decremented
|
|
||||||
*/
|
|
||||||
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
|
|
||||||
/**
|
|
||||||
* Increase category count by 1
|
|
||||||
* @param offer
|
|
||||||
*/
|
|
||||||
incrementCategory(offer: IRagfairOffer): void;
|
|
||||||
/**
|
|
||||||
* Reduce category count by 1
|
|
||||||
* @param offer
|
|
||||||
*/
|
|
||||||
decrementCategory(offer: IRagfairOffer): void;
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder";
|
import { RagfairOfferHolder } from "@spt-aki/utils/RagfairOfferHolder";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -20,7 +19,6 @@ export declare class RagfairOfferService {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
@ -30,7 +28,7 @@ export declare class RagfairOfferService {
|
|||||||
protected expiredOffers: Record<string, IRagfairOffer>;
|
protected expiredOffers: Record<string, IRagfairOffer>;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected ragfairOfferHandler: RagfairOfferHolder;
|
protected ragfairOfferHandler: RagfairOfferHolder;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get all offers
|
* Get all offers
|
||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
|
@ -56,6 +56,7 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
protected getIntellectGainedFromRepair(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
* @param repairDetails the repair details to calculate skill points for
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
@ -12,7 +12,7 @@ export declare class BundleCallbacks {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/bundles
|
* Handle singleplayer/bundles
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullRespons
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class GameCallbacks implements OnLoad {
|
export declare class GameCallbacks implements OnLoad {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -75,4 +75,3 @@ declare class GameCallbacks implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): any;
|
||||||
}
|
}
|
||||||
export { GameCallbacks };
|
|
||||||
|
@ -17,6 +17,7 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
@ -46,4 +47,5 @@ export declare class InventoryCallbacks {
|
|||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle OpenRandomLootContainer */
|
/** Handle OpenRandomLootContainer */
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileD
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
declare class LauncherCallbacks {
|
export declare class LauncherCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected launcherController: LauncherController;
|
protected launcherController: LauncherController;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -27,4 +27,3 @@ declare class LauncherCallbacks {
|
|||||||
getLoadedServerMods(): string;
|
getLoadedServerMods(): string;
|
||||||
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
}
|
}
|
||||||
export { LauncherCallbacks };
|
|
||||||
|
@ -6,7 +6,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks implements OnLoad {
|
export declare class ModCallbacks implements OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
@ -18,4 +18,3 @@ declare class ModCallbacks implements OnLoad {
|
|||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
export { ModCallbacks };
|
|
||||||
|
@ -23,12 +23,14 @@ import { IInventoryTagRequestData } from "@spt-aki/models/eft/inventory/IInvento
|
|||||||
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
|
import { PlayerService } from "@spt-aki/services/PlayerService";
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -49,10 +51,11 @@ export declare class InventoryController {
|
|||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected playerService: PlayerService;
|
||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
@ -162,6 +165,7 @@ export declare class InventoryController {
|
|||||||
* @returns response
|
* @returns response
|
||||||
*/
|
*/
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get the tplid of an item from the examine request object
|
* Get the tplid of an item from the examine request object
|
||||||
* @param body response request
|
* @param body response request
|
||||||
@ -217,4 +221,5 @@ export declare class InventoryController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export declare class RagfairController {
|
|||||||
* @param offers ragfair offers to get categories for
|
* @param offers ragfair offers to get categories for
|
||||||
* @returns record with tpls + counts
|
* @returns record with tpls + counts
|
||||||
*/
|
*/
|
||||||
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Add Required offers to offers result
|
* Add Required offers to offers result
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
|
@ -61,7 +61,9 @@ export declare class RepeatableQuestController {
|
|||||||
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
* (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
|
||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} sessionId Player's session id
|
* @param {string} _info Request from client
|
||||||
|
* @param {string} sessionID Player's session id
|
||||||
|
*
|
||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
@ -20,7 +20,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class TradeController {
|
export declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
@ -63,4 +63,3 @@ declare class TradeController {
|
|||||||
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
||||||
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
export { TradeController };
|
|
||||||
|
@ -15,7 +15,6 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "@spt-aki/services/RagfairCategoriesService";
|
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -38,7 +37,6 @@ export declare class RagfairOfferGenerator {
|
|||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
@ -47,7 +45,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
tpl: string;
|
tpl: string;
|
||||||
price: number;
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
* @param userID Owner of the offer
|
* @param userID Owner of the offer
|
||||||
|
@ -77,10 +77,10 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
*/
|
*/
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
||||||
/**
|
/**
|
||||||
* is the provided item allowed inside a container
|
* Is the provided item allowed inside a container
|
||||||
* @param slot location item wants to be placed in
|
* @param slotGrid Items sub-grid we want to place item inside
|
||||||
* @param itemTpl item being placed
|
* @param itemTpl Item tpl being placed
|
||||||
* @returns true if allowed
|
* @returns True if allowed
|
||||||
*/
|
*/
|
||||||
protected itemAllowedInContainer(slot: Grid, itemTpl: string): boolean;
|
protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class LookupItem<T, I> {
|
declare class LookupItem<T, I> {
|
||||||
@ -59,5 +60,6 @@ export declare class HandbookHelper {
|
|||||||
* @returns currency count in desired type
|
* @returns currency count in desired type
|
||||||
*/
|
*/
|
||||||
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
||||||
|
getCategoryById(handbookId: string): Category;
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -15,9 +15,11 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
@ -31,7 +33,7 @@ export declare class InRaidHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
protected inRaidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
* @returns True if items should be removed from inventory
|
* @returns True if items should be removed from inventory
|
||||||
@ -60,7 +62,6 @@ export declare class InRaidHelper {
|
|||||||
* Reset a profile to a baseline, used post-raid
|
* Reset a profile to a baseline, used post-raid
|
||||||
* Reset points earned during session property
|
* Reset points earned during session property
|
||||||
* Increment exp
|
* Increment exp
|
||||||
* Remove Labs keycard
|
|
||||||
* @param profileData Profile to update
|
* @param profileData Profile to update
|
||||||
* @param saveProgressRequest post raid save data request data
|
* @param saveProgressRequest post raid save data request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -89,13 +90,13 @@ export declare class InRaidHelper {
|
|||||||
*/
|
*/
|
||||||
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
updateScavProfileDataPostRaid(scavData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Look for quests with status = fail that were not failed pre-raid and run the failQuest() function
|
* Look for quests with a status different from what it began the raid with
|
||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param preRaidQuests Quests prior to starting raid
|
* @param preRaidQuests Quests prior to starting raid
|
||||||
* @param postRaidProfile Profile sent by client
|
* @param postRaidProfile Profile sent by client with post-raid quests
|
||||||
*/
|
*/
|
||||||
protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
protected processAlteredQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidProfile: IPostRaidPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Take body part effects from client profile and apply to server profile
|
* Take body part effects from client profile and apply to server profile
|
||||||
* @param saveProgressRequest post-raid request
|
* @param saveProgressRequest post-raid request
|
||||||
|
@ -15,7 +15,7 @@ import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
|||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
declare class ItemHelper {
|
export declare class ItemHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -355,4 +355,4 @@ declare namespace ItemHelper {
|
|||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export { ItemHelper };
|
export {};
|
||||||
|
@ -4,7 +4,6 @@ import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
|||||||
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
import { UtilityHelper } from "@spt-aki/helpers/UtilityHelper";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult";
|
|
||||||
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,14 +29,19 @@ export declare class RagfairHelper {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getCurrencyTag(currency: string): string;
|
getCurrencyTag(currency: string): string;
|
||||||
filterCategories(sessionID: string, info: ISearchRequestData): string[];
|
filterCategories(sessionID: string, request: ISearchRequestData): string[];
|
||||||
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
getDisplayableAssorts(sessionID: string): Record<string, ITraderAssort>;
|
||||||
protected getCategoryList(handbookId: string): string[];
|
protected getCategoryList(handbookId: string): string[];
|
||||||
countCategories(result: IGetOffersResult): void;
|
|
||||||
/**
|
/**
|
||||||
* Merges Root Items
|
* Merges Root Items
|
||||||
* Ragfair allows abnormally large stacks.
|
* Ragfair allows abnormally large stacks.
|
||||||
*/
|
*/
|
||||||
mergeStackable(items: Item[]): Item[];
|
mergeStackable(items: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Return the symbol for a currency
|
||||||
|
* e.g. 5449016a4bdc2d6f028b456f return ₽
|
||||||
|
* @param currencyTpl currency to get symbol for
|
||||||
|
* @returns symbol of currency
|
||||||
|
*/
|
||||||
getCurrencySymbol(currencyTpl: string): string;
|
getCurrencySymbol(currencyTpl: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,17 @@ import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
|||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RagfairSellHelper {
|
export declare class RagfairSellHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
* @param averageOfferPriceRub Price of average offer in roubles
|
||||||
@ -19,13 +21,6 @@ export declare class RagfairSellHelper {
|
|||||||
* @returns percent value
|
* @returns percent value
|
||||||
*/
|
*/
|
||||||
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
calculateSellChance(averageOfferPriceRub: number, playerListedPriceRub: number, qualityMultiplier: number): number;
|
||||||
/**
|
|
||||||
* Get percent chance to sell an item when price is below items average listing price
|
|
||||||
* @param playerListedPriceRub Price player listed item for in roubles
|
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
|
||||||
* @returns percent value
|
|
||||||
*/
|
|
||||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Get array of item count and sell time (empty array = no sell)
|
* Get array of item count and sell time (empty array = no sell)
|
||||||
* @param sellChancePercent chance item will sell
|
* @param sellChancePercent chance item will sell
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
@ -21,6 +22,7 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
|||||||
* Helper class for common ragfair server actions
|
* Helper class for common ragfair server actions
|
||||||
*/
|
*/
|
||||||
export declare class RagfairServerHelper {
|
export declare class RagfairServerHelper {
|
||||||
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -38,7 +40,7 @@ export declare class RagfairServerHelper {
|
|||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
protected static goodsReturnedTemplate: string;
|
protected static goodsReturnedTemplate: string;
|
||||||
constructor(randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Is item valid / on blacklist / quest item
|
* Is item valid / on blacklist / quest item
|
||||||
* @param itemDetails
|
* @param itemDetails
|
||||||
@ -76,14 +78,29 @@ export declare class RagfairServerHelper {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferCurrency(): string;
|
getDynamicOfferCurrency(): string;
|
||||||
getMemberType(userID: string): MemberCategory;
|
getMemberType(userID: string): MemberCategory;
|
||||||
|
/**
|
||||||
|
* Get a player or traders nickname from their profile by their user id
|
||||||
|
* @param userID Sessionid/userid
|
||||||
|
* @returns Nickname of individual
|
||||||
|
*/
|
||||||
getNickname(userID: string): string;
|
getNickname(userID: string): string;
|
||||||
getPresetItems(item: any): Item[];
|
/**
|
||||||
|
* Given a preset id from globals.json, return an array of items[] with unique ids
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns Array of weapon and its children
|
||||||
|
*/
|
||||||
|
getPresetItems(item: Item): Item[];
|
||||||
|
/**
|
||||||
|
* Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json
|
||||||
|
* @param item Preset item
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getPresetItemsByTpl(item: Item): Item[];
|
getPresetItemsByTpl(item: Item): Item[];
|
||||||
/**
|
/**
|
||||||
* Generate new unique ids for the children while preserving hierarchy
|
* Generate new unique ids for child items while preserving hierarchy
|
||||||
* @param item base item
|
* @param rootItem Base/primary item of preset
|
||||||
* @param preset
|
* @param preset Primary item + children of primary item
|
||||||
* @returns Item array with new IDs
|
* @returns Item array with new IDs
|
||||||
*/
|
*/
|
||||||
reparentPresets(item: Item, preset: Item[]): Item[];
|
reparentPresets(rootItem: Item, preset: Item[]): Item[];
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,22 @@ export declare class RepairHelper {
|
|||||||
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
||||||
*/
|
*/
|
||||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
||||||
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
|
||||||
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
|
||||||
/**
|
/**
|
||||||
* Is the supplied tpl a weapon
|
* Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material
|
||||||
* @param tpl tplId to check is a weapon
|
* @param armorMaterial What material is the armor being repaired made of
|
||||||
* @returns true if tpl is a weapon
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param armorMax Max amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
*/
|
*/
|
||||||
isWeaponTemplate(tpl: string): boolean;
|
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
||||||
|
/**
|
||||||
|
* Repairing weapons reduces the total durability value slightly, get a randomised (to 2dp) amount
|
||||||
|
* @param itemProps Weapon properties
|
||||||
|
* @param isRepairKit Was a repair kit used
|
||||||
|
* @param weaponMax ax amount of durability item can have
|
||||||
|
* @param traderQualityMultipler Different traders produce different loss values
|
||||||
|
* @returns Amount to reduce max durability by
|
||||||
|
*/
|
||||||
|
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,10 @@ export interface OwnerInventoryItems {
|
|||||||
export declare class SecureContainerHelper {
|
export declare class SecureContainerHelper {
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(itemHelper: ItemHelper);
|
constructor(itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Get an array of the item IDs (NOT tpls) inside a secure container
|
||||||
|
* @param items Inventory items to look for secure container in
|
||||||
|
* @returns Array of ids
|
||||||
|
*/
|
||||||
getSecureContainerItems(items: Item[]): string[];
|
getSecureContainerItems(items: Item[]): string[];
|
||||||
}
|
}
|
||||||
|
@ -53,5 +53,11 @@ export declare class TradeHelper {
|
|||||||
* @param itemsPurchasedCount number of items being bought
|
* @param itemsPurchasedCount number of items being bought
|
||||||
*/
|
*/
|
||||||
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
||||||
|
/**
|
||||||
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
|
* @param assortId Id of assort being purchased
|
||||||
|
* @param count How many are being bought
|
||||||
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ export declare class TraderAssortHelper {
|
|||||||
* Filter out assorts not unlocked due to level OR quest completion
|
* Filter out assorts not unlocked due to level OR quest completion
|
||||||
* @param sessionId session id
|
* @param sessionId session id
|
||||||
* @param traderId traders id
|
* @param traderId traders id
|
||||||
|
* @param flea Should assorts player hasn't unlocked be returned - default false
|
||||||
* @returns a traders' assorts
|
* @returns a traders' assorts
|
||||||
*/
|
*/
|
||||||
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
||||||
|
@ -63,6 +63,12 @@ export declare class TraderHelper {
|
|||||||
* @param traderID trader id to reset
|
* @param traderID trader id to reset
|
||||||
*/
|
*/
|
||||||
resetTrader(sessionID: string, traderID: string): void;
|
resetTrader(sessionID: string, traderID: string): void;
|
||||||
|
/**
|
||||||
|
* Get the starting standing of a trader based on the current profiles type (e.g. EoD, Standard etc)
|
||||||
|
* @param traderId Trader id to get standing for
|
||||||
|
* @param rawProfileTemplate Raw profile from profiles.json to look up standing from
|
||||||
|
* @returns Standing value
|
||||||
|
*/
|
||||||
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
||||||
/**
|
/**
|
||||||
* Alter a traders unlocked status
|
* Alter a traders unlocked status
|
||||||
|
@ -8,6 +8,11 @@ export declare class WeightedRandomHelper {
|
|||||||
getWeightedInventoryItem(itemArray: {
|
getWeightedInventoryItem(itemArray: {
|
||||||
[tplId: string]: unknown;
|
[tplId: string]: unknown;
|
||||||
} | ArrayLike<unknown>): string;
|
} | ArrayLike<unknown>): string;
|
||||||
|
/**
|
||||||
|
* Choos an item from the passed in array based on the weightings of each
|
||||||
|
* @param itemArray Items and weights to use
|
||||||
|
* @returns Chosen item from array
|
||||||
|
*/
|
||||||
getWeightedValue<T>(itemArray: {
|
getWeightedValue<T>(itemArray: {
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
} | ArrayLike<unknown>): T;
|
} | ArrayLike<unknown>): T;
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||||
|
export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData {
|
||||||
|
Action: "RedeemProfileReward";
|
||||||
|
events: IRedeemProfileRequestEvent[];
|
||||||
|
}
|
||||||
|
export interface IRedeemProfileRequestEvent {
|
||||||
|
MessageId: string;
|
||||||
|
EventId: string;
|
||||||
|
}
|
@ -3,6 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
|||||||
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
|
||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
||||||
|
import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDetails";
|
||||||
export interface IAkiProfile {
|
export interface IAkiProfile {
|
||||||
info: Info;
|
info: Info;
|
||||||
characters: Characters;
|
characters: Characters;
|
||||||
@ -95,7 +96,7 @@ export interface Message {
|
|||||||
items?: MessageItems;
|
items?: MessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
systemData?: ISystemData;
|
systemData?: ISystemData;
|
||||||
profileChangeEvents?: any[];
|
profileChangeEvents?: IProfileChangeEvent[];
|
||||||
}
|
}
|
||||||
export interface MessagePreview {
|
export interface MessagePreview {
|
||||||
uid: string;
|
uid: string;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user