chore: update types for 3.7.0
This commit is contained in:
parent
d538bd3962
commit
cfc58e6397
1
types/callbacks/BotCallbacks.d.ts
vendored
1
types/callbacks/BotCallbacks.d.ts
vendored
@ -10,6 +10,7 @@ export declare class BotCallbacks {
|
|||||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/bot/limit
|
* Handle singleplayer/settings/bot/limit
|
||||||
|
* Is called by client to define each bot roles wave limit
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
5
types/callbacks/GameCallbacks.d.ts
vendored
5
types/callbacks/GameCallbacks.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
import { GameController } from "../controllers/GameController";
|
import { GameController } from "../controllers/GameController";
|
||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "../models/eft/game/ICurrentGroupResponse";
|
||||||
@ -15,12 +16,14 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { Watermark } from "../utils/Watermark";
|
||||||
declare class GameCallbacks {
|
declare class GameCallbacks implements OnLoad {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected gameController: GameController;
|
protected gameController: GameController;
|
||||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, saveServer: SaveServer, gameController: GameController);
|
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, saveServer: SaveServer, gameController: GameController);
|
||||||
|
onLoad(): Promise<void>;
|
||||||
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/version/validate
|
* Handle client/game/version/validate
|
||||||
* @returns INullResponseData
|
* @returns INullResponseData
|
||||||
|
3
types/callbacks/InventoryCallbacks.d.ts
vendored
3
types/callbacks/InventoryCallbacks.d.ts
vendored
@ -21,8 +21,11 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
|||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
constructor(inventoryController: InventoryController);
|
||||||
|
/** Handle Move event */
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
2
types/callbacks/LauncherCallbacks.d.ts
vendored
2
types/callbacks/LauncherCallbacks.d.ts
vendored
@ -24,5 +24,7 @@ declare class LauncherCallbacks {
|
|||||||
ping(url: string, info: IEmptyRequestData, sessionID: string): string;
|
ping(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string;
|
removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string;
|
||||||
getCompatibleTarkovVersion(): string;
|
getCompatibleTarkovVersion(): string;
|
||||||
|
getLoadedServerMods(): string;
|
||||||
|
getServerModsProfileUsed(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
}
|
}
|
||||||
export { LauncherCallbacks };
|
export { LauncherCallbacks };
|
||||||
|
4
types/callbacks/NotifierCallbacks.d.ts
vendored
4
types/callbacks/NotifierCallbacks.d.ts
vendored
@ -6,11 +6,13 @@ import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
|||||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||||
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class NotifierCallbacks {
|
export declare class NotifierCallbacks {
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected notifierController: NotifierController;
|
protected notifierController: NotifierController;
|
||||||
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, notifierController: NotifierController);
|
constructor(httpServerHelper: HttpServerHelper, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, notifierController: NotifierController);
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
* because notification requests can be long-polling. In fact, we SHOULD wait
|
* because notification requests can be long-polling. In fact, we SHOULD wait
|
||||||
|
19
types/callbacks/PresetBuildCallbacks.d.ts
vendored
19
types/callbacks/PresetBuildCallbacks.d.ts
vendored
@ -4,16 +4,23 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
import { IRemoveBuildRequestData } from "../models/eft/presetBuild/IRemoveBuildRequestData";
|
||||||
|
import { IUserBuilds } from "../models/eft/profile/IAkiProfile";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class PresetBuildCallbacks {
|
export declare class PresetBuildCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected presetBuildController: PresetBuildController;
|
protected presetBuildController: PresetBuildController;
|
||||||
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
||||||
/** Handle client/handbook/builds/my/list */
|
/** Handle client/handbook/builds/my/list */
|
||||||
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IUserBuilds>;
|
||||||
/** Handle SaveBuild event */
|
/** Handle SaveWeaponBuild event */
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle RemoveBuild event*/
|
/** Handle removeBuild event*/
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveWeaponBuild event*/
|
||||||
|
removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle SaveEquipmentBuild event */
|
||||||
|
saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveEquipmentBuild event*/
|
||||||
|
removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
6
types/callbacks/RagfairCallbacks.d.ts
vendored
6
types/callbacks/RagfairCallbacks.d.ts
vendored
@ -14,9 +14,11 @@ import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
|||||||
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||||
|
import { IStorePlayerOfferTaxAmountRequestData } from "../models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
|
import { RagfairTaxService } from "../services/RagfairTaxService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
/**
|
/**
|
||||||
@ -27,9 +29,10 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
|
protected ragfairTaxService: RagfairTaxService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
@ -53,4 +56,5 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
|||||||
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
||||||
/** Handle client/reports/ragfair/send */
|
/** Handle client/reports/ragfair/send */
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
|
storePlayerOfferTaxAmount(url: string, request: IStorePlayerOfferTaxAmountRequestData, sessionId: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
3
types/callbacks/TradeCallbacks.d.ts
vendored
3
types/callbacks/TradeCallbacks.d.ts
vendored
@ -3,6 +3,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
import { ISellScavItemsToFenceRequestData } from "../models/eft/trade/ISellScavItemsToFenceRequestData";
|
||||||
export declare class TradeCallbacks {
|
export declare class TradeCallbacks {
|
||||||
protected tradeController: TradeController;
|
protected tradeController: TradeController;
|
||||||
constructor(tradeController: TradeController);
|
constructor(tradeController: TradeController);
|
||||||
@ -12,4 +13,6 @@ export declare class TradeCallbacks {
|
|||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle RagFairBuyOffer event */
|
/** Handle RagFairBuyOffer event */
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle SellAllFromSavage event */
|
||||||
|
sellAllFromSavage(pmcData: IPmcData, body: ISellScavItemsToFenceRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
4
types/controllers/BotController.d.ts
vendored
4
types/controllers/BotController.d.ts
vendored
@ -8,6 +8,7 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|||||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -29,6 +30,7 @@ export declare class BotController {
|
|||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
|
protected pmcConfig: IPmcConfig;
|
||||||
static readonly pmcTypeLabel = "PMC";
|
static readonly pmcTypeLabel = "PMC";
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
||||||
/**
|
/**
|
||||||
@ -70,5 +72,5 @@ export declare class BotController {
|
|||||||
* @returns cap number
|
* @returns cap number
|
||||||
*/
|
*/
|
||||||
getBotCap(): number;
|
getBotCap(): number;
|
||||||
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
|
getAiBotBrainTypes(): any;
|
||||||
}
|
}
|
||||||
|
44
types/controllers/DialogueController.d.ts
vendored
44
types/controllers/DialogueController.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
|
import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData";
|
||||||
@ -6,21 +7,28 @@ import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDia
|
|||||||
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
|
||||||
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
import { Dialogue, DialogueInfo, IAkiProfile, IUserDialogInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||||
import { MessageType } from "../models/enums/MessageType";
|
import { MessageType } from "../models/enums/MessageType";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { GiftService } from "../services/GiftService";
|
import { GiftService } from "../services/GiftService";
|
||||||
import { MailSendService } from "../services/MailSendService";
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueController {
|
export declare class DialogueController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected mailSendService: MailSendService;
|
protected mailSendService: MailSendService;
|
||||||
protected giftService: GiftService;
|
protected giftService: GiftService;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil);
|
protected configServer: ConfigServer;
|
||||||
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil, configServer: ConfigServer);
|
||||||
/** Handle onUpdate spt event */
|
/** Handle onUpdate spt event */
|
||||||
update(): void;
|
update(): void;
|
||||||
/**
|
/**
|
||||||
@ -69,7 +77,7 @@ export declare class DialogueController {
|
|||||||
*/
|
*/
|
||||||
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
|
protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue;
|
||||||
/**
|
/**
|
||||||
* Get the users involved in a mail between two entities
|
* Get the users involved in a mail between two entities
|
||||||
* @param fullProfile Player profile
|
* @param fullProfile Player profile
|
||||||
* @param dialogUsers The participants of the mail
|
* @param dialogUsers The participants of the mail
|
||||||
* @returns IUserDialogInfo array
|
* @returns IUserDialogInfo array
|
||||||
@ -88,21 +96,37 @@ export declare class DialogueController {
|
|||||||
* @returns true if uncollected rewards found
|
* @returns true if uncollected rewards found
|
||||||
*/
|
*/
|
||||||
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
||||||
/** Handle client/mail/dialog/remove */
|
/**
|
||||||
removeDialogue(dialogueID: string, sessionID: string): void;
|
* Handle client/mail/dialog/remove
|
||||||
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
* Remove an entire dialog with an entity (trader/user)
|
||||||
/** Handle client/mail/dialog/read */
|
* @param dialogueId id of the dialog to remove
|
||||||
setRead(dialogueIDs: string[], sessionID: string): void;
|
* @param sessionId Player id
|
||||||
|
*/
|
||||||
|
removeDialogue(dialogueId: string, sessionId: string): void;
|
||||||
|
/** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */
|
||||||
|
setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void;
|
||||||
|
/**
|
||||||
|
* Handle client/mail/dialog/read
|
||||||
|
* Set a dialog to be read (no number alert/attachment alert)
|
||||||
|
* @param dialogueIds Dialog ids to set as read
|
||||||
|
* @param sessionId Player profile id
|
||||||
|
*/
|
||||||
|
setRead(dialogueIds: string[], sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Handle client/mail/dialog/getAllAttachments
|
* Handle client/mail/dialog/getAllAttachments
|
||||||
* Get all uncollected items attached to mail in a particular dialog
|
* Get all uncollected items attached to mail in a particular dialog
|
||||||
* @param dialogueID Dialog to get mail attachments from
|
* @param dialogueId Dialog to get mail attachments from
|
||||||
* @param sessionID Session id
|
* @param sessionId Session id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse;
|
||||||
/** client/mail/msg/send */
|
/** client/mail/msg/send */
|
||||||
sendMessage(sessionId: string, request: ISendMessageRequest): string;
|
sendMessage(sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* Send responses back to player when they communicate with SPT friend on friends list
|
||||||
|
* @param sessionId Session Id
|
||||||
|
* @param request send message request
|
||||||
|
*/
|
||||||
protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void;
|
protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void;
|
||||||
protected getSptFriendData(friendId?: string): IUserDialogInfo;
|
protected getSptFriendData(friendId?: string): IUserDialogInfo;
|
||||||
/**
|
/**
|
||||||
|
34
types/controllers/GameController.d.ts
vendored
34
types/controllers/GameController.d.ts
vendored
@ -14,26 +14,32 @@ import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
|||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
|
import { ILootConfig } from "../models/spt/config/ILootConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
||||||
import { GiftService } from "../services/GiftService";
|
import { GiftService } from "../services/GiftService";
|
||||||
|
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { OpenZoneService } from "../services/OpenZoneService";
|
import { OpenZoneService } from "../services/OpenZoneService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { EncodingUtil } from "../utils/EncodingUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class GameController {
|
export declare class GameController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hideoutHelper: HideoutHelper;
|
protected hideoutHelper: HideoutHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
@ -41,6 +47,7 @@ export declare class GameController {
|
|||||||
protected customLocationWaveService: CustomLocationWaveService;
|
protected customLocationWaveService: CustomLocationWaveService;
|
||||||
protected openZoneService: OpenZoneService;
|
protected openZoneService: OpenZoneService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
protected giftService: GiftService;
|
protected giftService: GiftService;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
@ -48,11 +55,24 @@ export declare class GameController {
|
|||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
protected pmcConfig: IPmcConfig;
|
||||||
|
protected lootConfig: ILootConfig;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
|
load(): void;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
protected addCustomLooseLootPositions(): void;
|
||||||
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
/**
|
||||||
|
* 3.7.0 moved AIDs to be numeric, old profiles need to be migrated
|
||||||
|
* We store the old AID value in new field `sessionId`
|
||||||
|
* @param fullProfile Profile to update
|
||||||
|
*/
|
||||||
|
protected fixIncorrectAidValue(fullProfile: IAkiProfile): void;
|
||||||
/** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */
|
/** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */
|
||||||
protected adjustMapBotLimits(): void;
|
protected adjustMapBotLimits(): void;
|
||||||
/**
|
/**
|
||||||
@ -84,6 +104,7 @@ export declare class GameController {
|
|||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
*/
|
*/
|
||||||
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
protected warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void;
|
||||||
|
protected flagAllItemsInDbAsSellableOnFlea(): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* TODO - add body part HP regen
|
||||||
@ -118,9 +139,14 @@ export declare class GameController {
|
|||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
/**
|
/**
|
||||||
* Add the logged in players name to PMC name pool
|
* Add the logged in players name to PMC name pool
|
||||||
* @param pmcProfile
|
* @param pmcProfile Profile of player to get name from
|
||||||
*/
|
*/
|
||||||
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
|
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Check for a dialog with the key 'undefined', and remove it
|
||||||
|
* @param fullProfile Profile to check for dialog in
|
||||||
|
*/
|
||||||
|
protected checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void;
|
||||||
/**
|
/**
|
||||||
* Blank out the "test" mail message from prapor
|
* Blank out the "test" mail message from prapor
|
||||||
*/
|
*/
|
||||||
|
27
types/controllers/HealthController.d.ts
vendored
27
types/controllers/HealthController.d.ts
vendored
@ -29,34 +29,35 @@ export declare class HealthController {
|
|||||||
* stores in-raid player health
|
* stores in-raid player health
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param info Request data
|
* @param info Request data
|
||||||
* @param sessionID
|
* @param sessionID Player id
|
||||||
* @param addEffects Should effects found be added or removed from profile
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
|
* @param deleteExistingEffects Should all prior effects be removed before apply new ones
|
||||||
*/
|
*/
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||||
/**
|
/**
|
||||||
* When healing in menu
|
* When healing in menu
|
||||||
* @param pmcData
|
* @param pmcData Player profile
|
||||||
* @param body
|
* @param request Healing request
|
||||||
* @param sessionID
|
* @param sessionID Player id
|
||||||
* @returns
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, request: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle Eat event
|
* Handle Eat event
|
||||||
* Consume food/water outside of a raid
|
* Consume food/water outside of a raid
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param body request Object
|
* @param request Eat request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, request: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle RestoreHealth event
|
* Handle RestoreHealth event
|
||||||
* Occurs on post-raid healing page
|
* Occurs on post-raid healing page
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param healthTreatmentRequest Request data from client
|
* @param healthTreatmentRequest Request data from client
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
@ -66,12 +67,4 @@ export declare class HealthController {
|
|||||||
* @param sessionID
|
* @param sessionID
|
||||||
*/
|
*/
|
||||||
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
||||||
/**
|
|
||||||
* Iterate over treatment request diff and find effects to remove from player limbs
|
|
||||||
* @param sessionId
|
|
||||||
* @param profile Profile to update
|
|
||||||
* @param treatmentRequest client request
|
|
||||||
* @param output response to send to client
|
|
||||||
*/
|
|
||||||
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData, output: IItemEventRouterResponse): void;
|
|
||||||
}
|
}
|
||||||
|
35
types/controllers/HideoutController.d.ts
vendored
35
types/controllers/HideoutController.d.ts
vendored
@ -8,6 +8,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||||
|
import { IHideoutArea, Stage } from "../models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
@ -21,6 +22,7 @@ import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgrad
|
|||||||
import { IQteData } from "../models/eft/hideout/IQteData";
|
import { IQteData } from "../models/eft/hideout/IQteData";
|
||||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { HideoutAreas } from "../models/enums/HideoutAreas";
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
@ -76,6 +78,37 @@ export declare class HideoutController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Upgrade wall status to visible in profile if medstation/water collector are both level 1
|
||||||
|
* @param pmcData Player profile
|
||||||
|
*/
|
||||||
|
protected checkAndUpgradeWall(pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param pmcData Profile to edit
|
||||||
|
* @param output Object to send back to client
|
||||||
|
* @param sessionID Session/player id
|
||||||
|
* @param profileParentHideoutArea Current hideout area for profile
|
||||||
|
* @param dbHideoutArea Hideout area being upgraded
|
||||||
|
* @param hideoutStage Stage hideout area is being upgraded to
|
||||||
|
*/
|
||||||
|
protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: HideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void;
|
||||||
|
/**
|
||||||
|
* Add an inventory item to profile from a hideout area stage data
|
||||||
|
* @param pmcData Profile to update
|
||||||
|
* @param dbHideoutData Hideout area from db being upgraded
|
||||||
|
* @param hideoutStage Stage area upgraded to
|
||||||
|
*/
|
||||||
|
protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param output Objet to send to client
|
||||||
|
* @param sessionID Session/player id
|
||||||
|
* @param areaType Hideout area that had stash added
|
||||||
|
* @param hideoutDbData Hideout area that caused addition of stash
|
||||||
|
* @param hideoutStage Hideout area upgraded to this
|
||||||
|
*/
|
||||||
|
protected addContainerUpgradeToClientOutput(output: IItemEventRouterResponse, sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage): void;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
* Handle HideoutPutItemsInAreaSlots
|
||||||
* Create item in hideout slot item array, remove item from player inventory
|
* Create item in hideout slot item array, remove item from player inventory
|
||||||
@ -174,7 +207,7 @@ export declare class HideoutController {
|
|||||||
*/
|
*/
|
||||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
* Handles generating case rewards and sending to player inventory
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Get rewards from scavcase craft request
|
* @param request Get rewards from scavcase craft request
|
||||||
|
4
types/controllers/InraidController.d.ts
vendored
4
types/controllers/InraidController.d.ts
vendored
@ -104,10 +104,8 @@ export declare class InraidController {
|
|||||||
/**
|
/**
|
||||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||||
* @param offraidData Save Progress Request
|
* @param offraidData Save Progress Request
|
||||||
* @param pmcData player profile
|
|
||||||
* @param isPlayerScav Was the player a pScav
|
|
||||||
*/
|
*/
|
||||||
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData): void;
|
||||||
/**
|
/**
|
||||||
* Update profile after player completes scav raid
|
* Update profile after player completes scav raid
|
||||||
* @param scavData Scav profile
|
* @param scavData Scav profile
|
||||||
|
135
types/controllers/InsuranceController.d.ts
vendored
135
types/controllers/InsuranceController.d.ts
vendored
@ -1,12 +1,15 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { Insurance } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
@ -14,6 +17,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -27,26 +31,134 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items prior to being given to player in mail
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*/
|
*
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
processReturn(): void;
|
processReturn(): void;
|
||||||
/**
|
/**
|
||||||
* Should the passed in item be removed from player inventory
|
* Process insurance items of a single profile prior to being given back to the player through the mail service.
|
||||||
* @param insuredItem Insurued item to roll to lose
|
*
|
||||||
* @param traderId Trader the item was insured by
|
* @returns void
|
||||||
* @param itemsBeingDeleted All items to remove from player
|
*/
|
||||||
* @returns True if item should be removed
|
processReturnByProfile(sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get all insured items that are ready to be processed in a specific profile.
|
||||||
|
*
|
||||||
|
* @param sessionID Session ID of the profile to check.
|
||||||
|
* @param time The time to check ready status against. Current time by default.
|
||||||
|
* @returns All insured items that are ready to be processed.
|
||||||
*/
|
*/
|
||||||
protected itemShouldBeLost(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
|
protected filterInsuredItems(sessionID: string, time?: number): Insurance[];
|
||||||
|
/**
|
||||||
|
* This method orchestrates the processing of insured items in a profile.
|
||||||
|
*
|
||||||
|
* @param insuranceDetails The insured items to process.
|
||||||
|
* @param sessionID The session ID that should receive the processed items.
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Build an array of items to delete from the insured items.
|
||||||
|
*
|
||||||
|
* This method orchestrates several steps:
|
||||||
|
* - Filters items based on their presence in the database and their raid moddability.
|
||||||
|
* - Sorts base and independent child items to consider for deletion.
|
||||||
|
* - Groups child items by their parent for later evaluation.
|
||||||
|
* - Evaluates grouped child items to decide which should be deleted, based on their value and a random roll.
|
||||||
|
*
|
||||||
|
* @param insured - The insured items to build a removal array from.
|
||||||
|
* @returns An array of IDs representing items that should be deleted.
|
||||||
|
*/
|
||||||
|
protected findItemsToDelete(insured: Insurance): string[];
|
||||||
|
/**
|
||||||
|
* Filters an item based on its existence in the database, raid moddability, and slot requirements.
|
||||||
|
*
|
||||||
|
* @param item The item to be filtered.
|
||||||
|
* @param parentItemDbDetails The database details of the parent item, or null if the item has no parent.
|
||||||
|
* @param itemDbDetails A tuple where the first element is a boolean indicating if the item exists in the database,
|
||||||
|
* and the second element is the item details if it does.
|
||||||
|
* @returns true if the item exists in the database and neither of the following conditions are met:
|
||||||
|
* - The item has the RaidModdable property set to false.
|
||||||
|
* - The item is attached to a required slot in its parent item.
|
||||||
|
* Otherwise, returns false.
|
||||||
|
*/
|
||||||
|
protected filterByRaidModdability(item: Item, parentItemDbDetails: ITemplateItem | null, itemDbDetails: [boolean, ITemplateItem]): boolean;
|
||||||
|
/**
|
||||||
|
* Determines if an item is either a base item or a child item that is not equipped to its parent.
|
||||||
|
*
|
||||||
|
* @param item The item to check.
|
||||||
|
* @returns true if the item is a base or an independent child item, otherwise false.
|
||||||
|
*/
|
||||||
|
protected isBaseOrIndependentChild(item: Item): boolean;
|
||||||
|
/**
|
||||||
|
* Makes a roll to determine if a given item should be deleted. If the roll is successful, the item's ID is added
|
||||||
|
* to the `toDelete` array.
|
||||||
|
*
|
||||||
|
* @param item The item for which the roll is made.
|
||||||
|
* @param traderId The ID of the trader to consider in the rollForItemDelete method.
|
||||||
|
* @param toDelete The array accumulating the IDs of items to be deleted.
|
||||||
|
* @returns true if the item is marked for deletion, otherwise false.
|
||||||
|
*/
|
||||||
|
protected makeRollAndMarkForDeletion(item: Item, traderId: string, toDelete: string[]): boolean;
|
||||||
|
/**
|
||||||
|
* Groups child items by their parent IDs in a Map data structure.
|
||||||
|
*
|
||||||
|
* @param item The child item to be grouped by its parent.
|
||||||
|
* @param childrenGroupedByParent The Map that holds arrays of children items grouped by their parent IDs.
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
protected groupChildrenByParent(item: Item, childrenGroupedByParent: Map<string, Item[]>): void;
|
||||||
|
/**
|
||||||
|
* Sorts the array of children items in descending order by their maximum price. For each child, a roll is made to
|
||||||
|
* determine if it should be deleted. The method then deletes the most valuable children based on the number of
|
||||||
|
* successful rolls made.
|
||||||
|
*
|
||||||
|
* @param children The array of children items to sort and filter.
|
||||||
|
* @param traderId The ID of the trader to consider in the rollForItemDelete method.
|
||||||
|
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
protected sortAndFilterChildren(children: Item[], traderId: string, toDelete: string[]): void;
|
||||||
|
/**
|
||||||
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
|
*
|
||||||
|
* @param insured The insured items to process.
|
||||||
|
* @param toDelete The items that should be deleted.
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
protected removeItemsFromInsurance(insured: Insurance, toDelete: string[]): void;
|
||||||
|
/**
|
||||||
|
* Handle sending the insurance message to the user that potentially contains the valid insurance items.
|
||||||
|
*
|
||||||
|
* @param sessionID The session ID that should receive the insurance message.
|
||||||
|
* @param insurance The context of insurance to use.
|
||||||
|
* @param noItems Whether or not there are any items to return to the player.
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
protected sendMail(sessionID: string, insurance: Insurance, noItems: boolean): void;
|
||||||
|
/**
|
||||||
|
* Determines whether a valid insured item should be removed from the player's inventory based on a random roll and
|
||||||
|
* trader-specific return chance.
|
||||||
|
*
|
||||||
|
* @param insuredItem The insured item being evaluated for removal.
|
||||||
|
* @param traderId The ID of the trader who insured the item.
|
||||||
|
* @param itemsBeingDeleted List of items that are already slated for removal.
|
||||||
|
* @returns true if the insured item should be removed from inventory, false otherwise.
|
||||||
|
*/
|
||||||
|
protected rollForItemDelete(insuredItem: Item, traderId: string, itemsBeingDeleted: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Handle Insure event
|
* Handle Insure event
|
||||||
* Add insurance to an item
|
* Add insurance to an item
|
||||||
|
*
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param body Insurance request
|
* @param body Insurance request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,9 +168,10 @@ export declare class InsuranceController {
|
|||||||
/**
|
/**
|
||||||
* Handle client/insurance/items/list/cost
|
* Handle client/insurance/items/list/cost
|
||||||
* Calculate insurance cost
|
* Calculate insurance cost
|
||||||
* @param info request object
|
*
|
||||||
|
* @param request request object
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @returns IGetInsuranceCostResponseData object to send to client
|
* @returns IGetInsuranceCostResponseData object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
|
36
types/controllers/InventoryController.d.ts
vendored
36
types/controllers/InventoryController.d.ts
vendored
@ -76,30 +76,46 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Split Item
|
* Split Item
|
||||||
* spliting 1 item-stack into 2 separate items ...
|
* spliting 1 stack into 2
|
||||||
*/
|
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
* @param request Split request
|
||||||
|
* @param sessionID Session/player id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Merge Item
|
* Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer')
|
||||||
* merges 2 items into one, deletes item from `body.item` and adding number of stacks into `body.with`
|
* Deletes item from `body.item` and adding number of stacks into `body.with`
|
||||||
|
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||||
|
* @param body Merge request
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Transfer item
|
* TODO: Adds no data to output to send to client, is this by design?
|
||||||
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
* TODO: should make use of getOwnerInventoryItems(), stack being transferred may not always be on pmc
|
||||||
*/
|
* Transfer items from one stack into another while keeping original stack
|
||||||
|
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param body Transfer request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Swap Item
|
* Swap Item
|
||||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||||
|
* Also used to swap items using quick selection on character screen
|
||||||
*/
|
*/
|
||||||
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles folding of Weapons
|
* Handles folding of Weapons
|
||||||
*/
|
*/
|
||||||
|
20
types/controllers/LauncherController.d.ts
vendored
20
types/controllers/LauncherController.d.ts
vendored
@ -1,10 +1,13 @@
|
|||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
|
||||||
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
|
||||||
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
|
||||||
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
import { IRegisterData } from "../models/eft/launcher/IRegisterData";
|
||||||
import { Info } from "../models/eft/profile/IAkiProfile";
|
import { Info, ModDetails } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IConnectResponse } from "../models/eft/profile/IConnectResponse";
|
import { IConnectResponse } from "../models/eft/profile/IConnectResponse";
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
|
import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
@ -14,11 +17,13 @@ export declare class LauncherController {
|
|||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||||
connect(): IConnectResponse;
|
connect(): IConnectResponse;
|
||||||
/**
|
/**
|
||||||
* Get descriptive text for each of the profile edtions a player can choose
|
* Get descriptive text for each of the profile edtions a player can choose
|
||||||
@ -33,4 +38,15 @@ export declare class LauncherController {
|
|||||||
changePassword(info: IChangeRequestData): string;
|
changePassword(info: IChangeRequestData): string;
|
||||||
wipe(info: IRegisterData): string;
|
wipe(info: IRegisterData): string;
|
||||||
getCompatibleTarkovVersion(): string;
|
getCompatibleTarkovVersion(): string;
|
||||||
|
/**
|
||||||
|
* Get the mods the server has currently loaded
|
||||||
|
* @returns Dictionary of mod name and mod details
|
||||||
|
*/
|
||||||
|
getLoadedServerMods(): Record<string, IPackageJsonData>;
|
||||||
|
/**
|
||||||
|
* Get the mods a profile has ever loaded into game with
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @returns Array of mod details
|
||||||
|
*/
|
||||||
|
getServerModsProfileUsed(sessionId: string): ModDetails[];
|
||||||
}
|
}
|
||||||
|
14
types/controllers/LocationController.d.ts
vendored
14
types/controllers/LocationController.d.ts
vendored
@ -4,8 +4,10 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|||||||
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult";
|
import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult";
|
||||||
|
import { IGetLocationRequestData } from "../models/eft/location/IGetLocationRequestData";
|
||||||
import { AirdropTypeEnum } from "../models/enums/AirdropType";
|
import { AirdropTypeEnum } from "../models/enums/AirdropType";
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||||
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
import { LootRequest } from "../models/spt/services/LootRequest";
|
import { LootRequest } from "../models/spt/services/LootRequest";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -13,10 +15,12 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class LocationController {
|
export declare class LocationController {
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected locationGenerator: LocationGenerator;
|
protected locationGenerator: LocationGenerator;
|
||||||
@ -26,16 +30,18 @@ export declare class LocationController {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
protected locationConfig: ILocationConfig;
|
||||||
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/location/getLocalloot
|
* Handle client/location/getLocalloot
|
||||||
* Get a location (map) with generated loot data
|
* Get a location (map) with generated loot data
|
||||||
* @param location Map to generate loot for
|
* @param sessionId Player id
|
||||||
|
* @param request Map request to generate
|
||||||
* @returns ILocationBase
|
* @returns ILocationBase
|
||||||
*/
|
*/
|
||||||
get(location: string): ILocationBase;
|
get(sessionId: string, request: IGetLocationRequestData): ILocationBase;
|
||||||
/**
|
/**
|
||||||
* Generate a maps base location without loot
|
* Generate a maps base location with loot
|
||||||
* @param name Map name
|
* @param name Map name
|
||||||
* @returns ILocationBase
|
* @returns ILocationBase
|
||||||
*/
|
*/
|
||||||
|
4
types/controllers/MatchController.d.ts
vendored
4
types/controllers/MatchController.d.ts
vendored
@ -9,9 +9,9 @@ import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestDa
|
|||||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
@ -32,7 +32,7 @@ export declare class MatchController {
|
|||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected matchConfig: IMatchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
protected botConfig: IBotConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
/** Handle raid/profile/list */
|
/** Handle raid/profile/list */
|
||||||
|
29
types/controllers/PresetBuildController.d.ts
vendored
29
types/controllers/PresetBuildController.d.ts
vendored
@ -2,20 +2,35 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
import { IRemoveBuildRequestData } from "../models/eft/presetBuild/IRemoveBuildRequestData";
|
||||||
|
import { IUserBuilds } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class PresetBuildController {
|
export declare class PresetBuildController {
|
||||||
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
/** Handle client/handbook/builds/my/list */
|
/** Handle client/handbook/builds/my/list */
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
getUserBuilds(sessionID: string): IUserBuilds;
|
||||||
/** Handle SaveBuild event */
|
/** Handle SaveWeaponBuild event */
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
/** Handle RemoveBuild event*/
|
/** Handle SaveEquipmentBuild event */
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, buildType: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveWeaponBuild event*/
|
||||||
|
removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveWeaponBuild event*/
|
||||||
|
removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle RemoveEquipmentBuild event*/
|
||||||
|
removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
protected removePlayerBuild(pmcData: IPmcData, id: string, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
19
types/controllers/QuestController.d.ts
vendored
19
types/controllers/QuestController.d.ts
vendored
@ -5,6 +5,7 @@ import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
|||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { IQuestStatus } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { AvailableForConditions, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
@ -23,10 +24,12 @@ import { MailSendService } from "../services/MailSendService";
|
|||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class QuestController {
|
export declare class QuestController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -43,7 +46,7 @@ export declare class QuestController {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/quest/list
|
* Handle client/quest/list
|
||||||
* Get all quests visible to player
|
* Get all quests visible to player
|
||||||
@ -58,7 +61,7 @@ export declare class QuestController {
|
|||||||
* @param playerLevel level of player to test against quest
|
* @param playerLevel level of player to test against quest
|
||||||
* @returns true if quest can be seen/accepted by player of defined level
|
* @returns true if quest can be seen/accepted by player of defined level
|
||||||
*/
|
*/
|
||||||
protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean;
|
protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean;
|
||||||
/**
|
/**
|
||||||
* Should a quest be shown to the player in trader quest screen
|
* Should a quest be shown to the player in trader quest screen
|
||||||
* @param questId Quest to check
|
* @param questId Quest to check
|
||||||
@ -110,6 +113,13 @@ export declare class QuestController {
|
|||||||
* @returns ItemEvent client response
|
* @returns ItemEvent client response
|
||||||
*/
|
*/
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Return quests that have different statuses
|
||||||
|
* @param preQuestStatusus Quests before
|
||||||
|
* @param postQuestStatuses Quests after
|
||||||
|
* @returns QuestStatusChange array
|
||||||
|
*/
|
||||||
|
protected getQuestsWithDifferentStatuses(preQuestStatusus: IQuestStatus[], postQuestStatuses: IQuestStatus[]): IQuestStatus[];
|
||||||
/**
|
/**
|
||||||
* Send a popup to player on successful completion of a quest
|
* Send a popup to player on successful completion of a quest
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
@ -132,13 +142,14 @@ export declare class QuestController {
|
|||||||
*/
|
*/
|
||||||
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Fail the quests provided
|
* Fail the provided quests
|
||||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
* Update quest in profile, otherwise add fresh quest object with failed status
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param questsToFail quests to fail
|
* @param questsToFail quests to fail
|
||||||
|
* @param output Client output
|
||||||
*/
|
*/
|
||||||
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[], output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Handle QuestHandover event
|
* Handle QuestHandover event
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
35
types/controllers/RagfairController.d.ts
vendored
35
types/controllers/RagfairController.d.ts
vendored
@ -8,7 +8,6 @@ import { RagfairHelper } from "../helpers/RagfairHelper";
|
|||||||
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
||||||
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
||||||
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
||||||
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
@ -22,6 +21,7 @@ import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPric
|
|||||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
|
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
@ -34,6 +34,7 @@ import { PaymentService } from "../services/PaymentService";
|
|||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||||
|
import { RagfairTaxService } from "../services/RagfairTaxService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
/**
|
/**
|
||||||
@ -50,7 +51,7 @@ export declare class RagfairController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected ragfairSellHelper: RagfairSellHelper;
|
protected ragfairSellHelper: RagfairSellHelper;
|
||||||
protected ragfairTaxHelper: RagfairTaxHelper;
|
protected ragfairTaxService: RagfairTaxService;
|
||||||
protected ragfairSortHelper: RagfairSortHelper;
|
protected ragfairSortHelper: RagfairSortHelper;
|
||||||
protected ragfairOfferHelper: RagfairOfferHelper;
|
protected ragfairOfferHelper: RagfairOfferHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
@ -66,12 +67,12 @@ export declare class RagfairController {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
||||||
/**
|
/**
|
||||||
* Get offers for the client based on type of search being performed
|
* Get offers for the client based on type of search being performed
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
* @param itemsToAdd
|
* @param itemsToAdd comes from ragfairHelper.filterCategories()
|
||||||
* @param traderAssorts Trader assorts
|
* @param traderAssorts Trader assorts
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns array of offers
|
* @returns array of offers
|
||||||
@ -125,6 +126,18 @@ export declare class RagfairController {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Charge player a listing fee for using flea, pulls charge from data previously sent by client
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @param rootItem Base item being listed (used when client tax cost not found and must be done on server)
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param requirementsPriceInRub Rouble cost player chose for listing (used when client tax cost not found and must be done on server)
|
||||||
|
* @param itemStackCount How many items were listed in player (used when client tax cost not found and must be done on server)
|
||||||
|
* @param offerRequest Add offer request object from client
|
||||||
|
* @param output IItemEventRouterResponse
|
||||||
|
* @returns True if charging tax to player failed
|
||||||
|
*/
|
||||||
|
protected chargePlayerTaxFee(sessionID: string, rootItem: Item, pmcData: IPmcData, requirementsPriceInRub: number, itemStackCount: number, offerRequest: IAddOfferRequestData, output: IItemEventRouterResponse): boolean;
|
||||||
/**
|
/**
|
||||||
* Is the item to be listed on the flea valid
|
* Is the item to be listed on the flea valid
|
||||||
* @param offerRequest Client offer request
|
* @param offerRequest Client offer request
|
||||||
@ -149,6 +162,20 @@ export declare class RagfairController {
|
|||||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||||
getAllFleaPrices(): Record<string, number>;
|
getAllFleaPrices(): Record<string, number>;
|
||||||
getStaticPrices(): Record<string, number>;
|
getStaticPrices(): Record<string, number>;
|
||||||
|
/**
|
||||||
|
* User requested removal of the offer, actually reduces the time to 71 seconds,
|
||||||
|
* allowing for the possibility of extending the auction before it's end time
|
||||||
|
* @param offerId offer to 'remove'
|
||||||
|
* @param sessionID Players id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Create a basic trader request object with price and currency type
|
||||||
|
* @param currency What currency: RUB, EURO, USD
|
||||||
|
* @param value Amount of currency
|
||||||
|
* @returns IProcessBuyTradeRequestData
|
||||||
|
*/
|
||||||
|
protected createBuyTradeRequestObject(currency: string, value: number): IProcessBuyTradeRequestData;
|
||||||
}
|
}
|
||||||
|
34
types/controllers/TradeController.d.ts
vendored
34
types/controllers/TradeController.d.ts
vendored
@ -1,11 +1,15 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { TradeHelper } from "../helpers/TradeHelper";
|
import { TradeHelper } from "../helpers/TradeHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Upd } from "../models/eft/common/tables/IItem";
|
import { Item, Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
import { ISellScavItemsToFenceRequestData } from "../models/eft/trade/ISellScavItemsToFenceRequestData";
|
||||||
|
import { Traders } from "../models/enums/Traders";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -13,24 +17,50 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
declare class TradeController {
|
declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/** Handle TradingConfirm event */
|
/** Handle TradingConfirm event */
|
||||||
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle RagFairBuyOffer event */
|
/** Handle RagFairBuyOffer event */
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/** Handle SellAllFromSavage event */
|
||||||
|
sellScavItemsToFence(pmcData: IPmcData, body: ISellScavItemsToFenceRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Sell all sellable items to a trader from inventory
|
||||||
|
* WILL DELETE ITEMS FROM INVENTORY + CHILDREN OF ITEMS SOLD
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param profileWithItemsToSell Profile with items to be sold to trader
|
||||||
|
* @param profileThatGetsMoney Profile that gets the money after selling items
|
||||||
|
* @param trader Trader to sell items to
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
protected sellInventoryToTrader(sessionId: string, profileWithItemsToSell: IPmcData, profileThatGetsMoney: IPmcData, trader: Traders): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Looks up an items children and gets total handbook price for them
|
||||||
|
* @param parentItemId parent item that has children we want to sum price of
|
||||||
|
* @param items All items (parent + children)
|
||||||
|
* @param handbookPrices Prices of items from handbook
|
||||||
|
* @param traderDetails Trader being sold to to perform buy category check against
|
||||||
|
* @returns Rouble price
|
||||||
|
*/
|
||||||
|
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 };
|
export { TradeController };
|
||||||
|
17
types/generators/BotEquipmentModGenerator.d.ts
vendored
17
types/generators/BotEquipmentModGenerator.d.ts
vendored
@ -14,7 +14,6 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
@ -29,7 +28,6 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
@ -40,7 +38,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check mods are compatible and add to array
|
* Check mods are compatible and add to array
|
||||||
* @param equipment Equipment item to add mods to
|
* @param equipment Equipment item to add mods to
|
||||||
@ -83,10 +81,11 @@ export declare class BotEquipmentModGenerator {
|
|||||||
*/
|
*/
|
||||||
protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean;
|
protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Set all scope mod chances to 100%
|
* Set mod spawn chances to defined amount
|
||||||
* @param modSpawnChances Chances objet to update
|
* @param modSpawnChances Chance dictionary to update
|
||||||
*/
|
*/
|
||||||
protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void;
|
protected adjustSlotSpawnChances(modSpawnChances: ModsChances, modSlotsToAdjust: string[], newChancePercent: number): void;
|
||||||
|
protected modSlotCanHoldMuzzleDevices(modSlot: string, modsParentId: string): boolean;
|
||||||
protected sortModKeys(unsortedKeys: string[]): string[];
|
protected sortModKeys(unsortedKeys: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
* Get a Slot property for an item (chamber/cartridge/slot)
|
||||||
@ -193,10 +192,12 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||||
/**
|
/**
|
||||||
* Filter out non-whitelisted weapon scopes
|
* Filter out non-whitelisted weapon scopes
|
||||||
|
* Controlled by bot.json weaponSightWhitelist
|
||||||
|
* e.g. filter out rifle scopes from SMGs
|
||||||
* @param weapon Weapon scopes will be added to
|
* @param weapon Weapon scopes will be added to
|
||||||
* @param scopes Full scope pool
|
* @param scopes Full scope pool
|
||||||
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
* @param botWeaponSightWhitelist Whitelist of scope types by weapon base type
|
||||||
* @returns array of scope tpls that have been filtered
|
* @returns Array of scope tpls that have been filtered to just ones allowed for that weapon type
|
||||||
*/
|
*/
|
||||||
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
||||||
}
|
}
|
||||||
|
17
types/generators/BotGenerator.d.ts
vendored
17
types/generators/BotGenerator.d.ts
vendored
@ -3,13 +3,15 @@ import { BotHelper } from "../helpers/BotHelper";
|
|||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -32,9 +34,11 @@ export declare class BotGenerator {
|
|||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
protected pmcConfig: IPmcConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -64,6 +68,13 @@ export declare class BotGenerator {
|
|||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Choose various appearance settings for a bot using weights
|
||||||
|
* @param bot Bot to adjust
|
||||||
|
* @param appearance Appearance settings to choose from
|
||||||
|
* @param botGenerationDetails Generation details
|
||||||
|
*/
|
||||||
|
protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void;
|
||||||
/**
|
/**
|
||||||
* Create a bot nickname
|
* Create a bot nickname
|
||||||
* @param botJsonTemplate x.json from database
|
* @param botJsonTemplate x.json from database
|
||||||
@ -71,7 +82,7 @@ export declare class BotGenerator {
|
|||||||
* @param botRole role of bot e.g. assault
|
* @param botRole role of bot e.g. assault
|
||||||
* @returns Nickname for bot
|
* @returns Nickname for bot
|
||||||
*/
|
*/
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string): string;
|
protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string, sessionId: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
|
8
types/generators/BotInventoryGenerator.d.ts
vendored
8
types/generators/BotInventoryGenerator.d.ts
vendored
@ -1,5 +1,6 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
@ -25,12 +26,13 @@ export declare class BotInventoryGenerator {
|
|||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Add equipment/weapons/loot to bot
|
* Add equipment/weapons/loot to bot
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -103,10 +105,10 @@ export declare class BotInventoryGenerator {
|
|||||||
* @param equipmentChances Chances bot can have equipment equipped
|
* @param equipmentChances Chances bot can have equipment equipped
|
||||||
* @param botRole assault/pmcBot/bossTagilla etc
|
* @param botRole assault/pmcBot/bossTagilla etc
|
||||||
* @param isPmc Is the bot being generated as a pmc
|
* @param isPmc Is the bot being generated as a pmc
|
||||||
* @param itemGenerationLimitsMinMax
|
* @param itemGenerationWeights
|
||||||
*/
|
*/
|
||||||
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
||||||
slot: EquipmentSlots;
|
slot: EquipmentSlots;
|
||||||
shouldSpawn: boolean;
|
shouldSpawn: boolean;
|
||||||
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void;
|
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void;
|
||||||
}
|
}
|
||||||
|
71
types/generators/BotLootGenerator.d.ts
vendored
71
types/generators/BotLootGenerator.d.ts
vendored
@ -2,11 +2,14 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -25,11 +28,13 @@ export declare class BotLootGenerator {
|
|||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
protected pmcConfig: IPmcConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Add loot to bots containers
|
* Add loot to bots containers
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -40,17 +45,36 @@ export declare class BotLootGenerator {
|
|||||||
* @param botLevel Level of bot
|
* @param botLevel Level of bot
|
||||||
*/
|
*/
|
||||||
generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
||||||
|
/**
|
||||||
|
* Get an array of the containers a bot has on them (pockets/backpack/vest)
|
||||||
|
* @param botInventory Bot to check
|
||||||
|
* @returns Array of available slots
|
||||||
|
*/
|
||||||
|
protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[];
|
||||||
|
/**
|
||||||
|
* Force healing items onto bot to ensure they can heal in-raid
|
||||||
|
* @param botInventory Inventory to add items to
|
||||||
|
* @param botRole Role of bot (sptBear/sptUsec)
|
||||||
|
*/
|
||||||
|
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void;
|
||||||
|
/**
|
||||||
|
* Get a biased random number
|
||||||
|
* @param min Smallest size
|
||||||
|
* @param max Biggest size
|
||||||
|
* @param nValue Value to bias choice
|
||||||
|
* @returns Chosen number
|
||||||
|
*/
|
||||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||||
/**
|
/**
|
||||||
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
||||||
* @param pool pool of items to pick from
|
* @param pool Pool of items to pick from
|
||||||
* @param equipmentSlots What equality slot will the loot items be added to
|
* @param equipmentSlots What equipment slot will the loot items be added to
|
||||||
* @param totalItemCount Max count of items to add
|
* @param totalItemCount Max count of items to add
|
||||||
* @param inventoryToAddItemsTo bot inventory loot will be added to
|
* @param inventoryToAddItemsTo Bot inventory loot will be added to
|
||||||
* @param botRole role of the bot loot is being generated for (assault/pmcbot)
|
* @param botRole Role of the bot loot is being generated for (assault/pmcbot)
|
||||||
* @param useLimits should item limit counts be used as defined in config/bot.json
|
* @param useLimits Should item limit counts be used as defined in config/bot.json
|
||||||
* @param totalValueLimitRub total value of loot allowed in roubles
|
* @param totalValueLimitRub Total value of loot allowed in roubles
|
||||||
* @param isPmc is the bot being generated for a pmc
|
* @param isPmc Is bot being generated for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||||
/**
|
/**
|
||||||
@ -64,38 +88,23 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
* @deprecated replaced by getRandomItemFromPoolByRole()
|
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool Pool of items to pick an item from
|
||||||
* @param isPmc is the bot being created a pmc
|
* @param isPmc Is the bot being created a pmc
|
||||||
* @returns ITemplateItem object
|
|
||||||
*/
|
|
||||||
protected getRandomItemFromPool(pool: ITemplateItem[], isPmc: boolean): ITemplateItem;
|
|
||||||
/**
|
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
|
||||||
* @param pool pool of items to pick an item from
|
|
||||||
* @param isPmc is the bot being created a pmc
|
|
||||||
* @returns ITemplateItem object
|
* @returns ITemplateItem object
|
||||||
*/
|
*/
|
||||||
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
||||||
/**
|
/**
|
||||||
* @deprecated Replaced by getBotLootNValueByRole()
|
|
||||||
* Get the loot nvalue from botconfig
|
* Get the loot nvalue from botconfig
|
||||||
* @param isPmc if true the pmc nvalue is returned
|
* @param botRole Role of bot e.g. assault/bosstagilla/sptBear
|
||||||
* @returns nvalue as number
|
|
||||||
*/
|
|
||||||
protected getBotLootNValue(isPmc: boolean): number;
|
|
||||||
/**
|
|
||||||
* Get the loot nvalue from botconfig
|
|
||||||
* @param botRole role of bot e.g. assault/sptBear
|
|
||||||
* @returns nvalue as number
|
* @returns nvalue as number
|
||||||
*/
|
*/
|
||||||
protected getBotLootNValueByRole(botRole: string): number;
|
protected getBotLootNValueByRole(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Update item limit array to contain items that have a limit
|
* Hydrate item limit array to contain items that have a limit for a specific bot type
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
* @param isPmc is the bot a pmc
|
* @param isPmc Is the bot a pmc
|
||||||
* @param botRole role the bot has
|
* @param botRole Role the bot has
|
||||||
* @param limitCount
|
* @param limitCount
|
||||||
*/
|
*/
|
||||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
||||||
@ -104,8 +113,8 @@ export declare class BotLootGenerator {
|
|||||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||||
* @param botRole Bot type
|
* @param botRole Bot type
|
||||||
* @param isPmc Is bot we're working with a pmc
|
* @param isPmc Is bot we're working with a pmc
|
||||||
* @param limitCount spawn limits for items on bot
|
* @param limitCount Spawn limits for items on bot
|
||||||
* @param itemSpawnLimits the limits this bot is allowed to have
|
* @param itemSpawnLimits The limits this bot is allowed to have
|
||||||
* @returns true if item has reached spawn limit
|
* @returns true if item has reached spawn limit
|
||||||
*/
|
*/
|
||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
|
17
types/generators/BotWeaponGenerator.d.ts
vendored
17
types/generators/BotWeaponGenerator.d.ts
vendored
@ -2,18 +2,20 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
|||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { GenerationData, Inventory, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
import { GenerateWeaponResult } from "../models/spt/bots/GenerateWeaponResult";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { RepairService } from "../services/RepairService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
@ -33,10 +35,13 @@ export declare class BotWeaponGenerator {
|
|||||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected repairService: RepairService;
|
||||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
protected inventoryMagGenComponents: IInventoryMagGen[];
|
||||||
protected readonly modMagazineSlotId = "mod_magazine";
|
protected readonly modMagazineSlotId = "mod_magazine";
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
protected pmcConfig: IPmcConfig;
|
||||||
|
protected repairConfig: IRepairConfig;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||||
/**
|
/**
|
||||||
* Pick a random weapon based on weightings and generate a functional weapon
|
* Pick a random weapon based on weightings and generate a functional weapon
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
@ -63,7 +68,7 @@ export declare class BotWeaponGenerator {
|
|||||||
* @param weaponParentId ParentId of the weapon being generated
|
* @param weaponParentId ParentId of the weapon being generated
|
||||||
* @param modChances Dictionary of item types and % chance weapon will have that mod
|
* @param modChances Dictionary of item types and % chance weapon will have that mod
|
||||||
* @param botRole e.g. assault/exusec
|
* @param botRole e.g. assault/exusec
|
||||||
* @param isPmc
|
* @param isPmc Is weapon being generated for a pmc
|
||||||
* @returns GenerateWeaponResult object
|
* @returns GenerateWeaponResult object
|
||||||
*/
|
*/
|
||||||
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
||||||
@ -104,11 +109,11 @@ export declare class BotWeaponGenerator {
|
|||||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||||
* Additionally, adds extra bullets to SecuredContainer
|
* Additionally, adds extra bullets to SecuredContainer
|
||||||
* @param generatedWeaponResult object with properties for generated weapon (weapon mods pool / weapon template / ammo tpl)
|
* @param generatedWeaponResult object with properties for generated weapon (weapon mods pool / weapon template / ammo tpl)
|
||||||
* @param magCounts Magazine count to add to inventory
|
* @param magWeights Magazine weights for count to add to inventory
|
||||||
* @param inventory Inventory to add magazines to
|
* @param inventory Inventory to add magazines to
|
||||||
* @param botRole The bot type we're getting generating extra mags for
|
* @param botRole The bot type we're getting generating extra mags for
|
||||||
*/
|
*/
|
||||||
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: GenerationData, inventory: PmcInventory, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
* Add Grendaes for UBGL to bots vest and secure container
|
* Add Grendaes for UBGL to bots vest and secure container
|
||||||
* @param weaponMods Weapon array with mods
|
* @param weaponMods Weapon array with mods
|
||||||
|
51
types/generators/LocationGenerator.d.ts
vendored
51
types/generators/LocationGenerator.d.ts
vendored
@ -2,12 +2,15 @@ import { ContainerHelper } from "../helpers/ContainerHelper";
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
|
import { IContainerMinMax, IStaticContainer } from "../models/eft/common/ILocation";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "../models/eft/common/ILooseLoot";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "../models/eft/common/tables/ILootBase";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
@ -19,8 +22,15 @@ export interface IContainerItem {
|
|||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
}
|
}
|
||||||
|
export interface IContainerGroupCount {
|
||||||
|
/** Containers this group has + probabilty to spawn */
|
||||||
|
containerIdsWithProbability: Record<string, number>;
|
||||||
|
/** How many containers the map should spawn with this group id */
|
||||||
|
chosenCount: number;
|
||||||
|
}
|
||||||
export declare class LocationGenerator {
|
export declare class LocationGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
@ -33,7 +43,39 @@ export declare class LocationGenerator {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Create an array of container objects with randomised loot
|
||||||
|
* @param locationBase Map base to generate containers for
|
||||||
|
* @param staticAmmoDist Static ammo distribution - database.loot.staticAmmo
|
||||||
|
* @returns Array of container objects
|
||||||
|
*/
|
||||||
|
generateStaticContainers(locationBase: ILocationBase, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): SpawnpointTemplate[];
|
||||||
|
/**
|
||||||
|
* Get containers with a non-100% chance to spawn OR are NOT on the container type randomistion blacklist
|
||||||
|
* @param staticContainers
|
||||||
|
* @returns IStaticContainerData array
|
||||||
|
*/
|
||||||
|
protected getRandomisableContainersOnMap(staticContainers: IStaticContainerData[]): IStaticContainerData[];
|
||||||
|
/**
|
||||||
|
* Get containers with 100% spawn rate or have a type on the randomistion ignore list
|
||||||
|
* @param staticContainersOnMap
|
||||||
|
* @returns IStaticContainerData array
|
||||||
|
*/
|
||||||
|
protected getGuaranteedContainers(staticContainersOnMap: IStaticContainerData[]): IStaticContainerData[];
|
||||||
|
/**
|
||||||
|
* Choose a number of containers based on their probabilty value to fulfil the desired count in containerData.chosenCount
|
||||||
|
* @param groupId Name of the group the containers are being collected for
|
||||||
|
* @param containerData Containers and probability values for a groupId
|
||||||
|
* @returns List of chosen container Ids
|
||||||
|
*/
|
||||||
|
protected getContainersByProbabilty(groupId: string, containerData: IContainerGroupCount): string[];
|
||||||
|
/**
|
||||||
|
* Get a mapping of each groupid and the containers in that group + count of containers to spawn on map
|
||||||
|
* @param containersGroups Container group values
|
||||||
|
* @returns dictionary keyed by groupId
|
||||||
|
*/
|
||||||
|
protected getGroupIdToContainerMappings(staticContainerGroupData: IStaticContainer | Record<string, IContainerMinMax>, staticContainersOnMap: IStaticContainerData[]): Record<string, IContainerGroupCount>;
|
||||||
/**
|
/**
|
||||||
* Choose loot to put into a static container based on weighting
|
* Choose loot to put into a static container based on weighting
|
||||||
* Handle forced items + seasonal item removal when not in season
|
* Handle forced items + seasonal item removal when not in season
|
||||||
@ -44,7 +86,7 @@ export declare class LocationGenerator {
|
|||||||
* @param locationName Name of the map to generate static loot for
|
* @param locationName Name of the map to generate static loot for
|
||||||
* @returns IStaticContainerProps
|
* @returns IStaticContainerProps
|
||||||
*/
|
*/
|
||||||
generateContainerLoot(staticContainer: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
protected addLootToContainer(staticContainer: IStaticContainerData, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerData;
|
||||||
/**
|
/**
|
||||||
* Get a 2d grid of a containers item slots
|
* Get a 2d grid of a containers item slots
|
||||||
* @param containerTpl Tpl id of the container
|
* @param containerTpl Tpl id of the container
|
||||||
@ -88,9 +130,10 @@ export declare class LocationGenerator {
|
|||||||
* Create array of item (with child items) and return
|
* Create array of item (with child items) and return
|
||||||
* @param chosenComposedKey Key we want to look up items for
|
* @param chosenComposedKey Key we want to look up items for
|
||||||
* @param spawnPoint Dynamic spawn point item we want will be placed in
|
* @param spawnPoint Dynamic spawn point item we want will be placed in
|
||||||
|
* @param staticAmmoDist ammo distributions
|
||||||
* @returns IContainerItem
|
* @returns IContainerItem
|
||||||
*/
|
*/
|
||||||
protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint): IContainerItem;
|
protected createDynamicLootItem(chosenComposedKey: string, spawnPoint: Spawnpoint, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): IContainerItem;
|
||||||
/**
|
/**
|
||||||
* Replace the _id value for base item + all children items parentid value
|
* Replace the _id value for base item + all children items parentid value
|
||||||
* @param itemWithChildren Item with mods to update
|
* @param itemWithChildren Item with mods to update
|
||||||
|
10
types/generators/PMCLootGenerator.d.ts
vendored
10
types/generators/PMCLootGenerator.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
@ -18,7 +18,7 @@ export declare class PMCLootGenerator {
|
|||||||
protected pocketLootPool: string[];
|
protected pocketLootPool: string[];
|
||||||
protected vestLootPool: string[];
|
protected vestLootPool: string[];
|
||||||
protected backpackLootPool: string[];
|
protected backpackLootPool: string[];
|
||||||
protected botConfig: IBotConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
@ -31,12 +31,12 @@ export declare class PMCLootGenerator {
|
|||||||
*/
|
*/
|
||||||
generatePMCVestLootPool(): string[];
|
generatePMCVestLootPool(): string[];
|
||||||
/**
|
/**
|
||||||
* Check if item has a width/height that lets it fit into a 1x2/2x1 slot
|
* Check if item has a width/height that lets it fit into a 2x2 slot
|
||||||
* 1x1 / 1x2 / 2x1
|
* 1x1 / 1x2 / 2x1 / 2x2
|
||||||
* @param item Item to check size of
|
* @param item Item to check size of
|
||||||
* @returns true if it fits
|
* @returns true if it fits
|
||||||
*/
|
*/
|
||||||
protected itemFitsInto1By2Slot(item: ITemplateItem): boolean;
|
protected itemFitsInto2By2Slot(item: ITemplateItem): boolean;
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their backpack
|
* Create an array of loot items a PMC can have in their backpack
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
|
20
types/generators/RagfairOfferGenerator.d.ts
vendored
20
types/generators/RagfairOfferGenerator.d.ts
vendored
@ -55,11 +55,10 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param items Items in the offer
|
* @param items Items in the offer
|
||||||
* @param barterScheme Cost of item (currency or barter)
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
* @param loyalLevel Loyalty level needed to buy item
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
* @param price Price of offer
|
* @param sellInOnePiece Flags sellInOnePiece to be true
|
||||||
* @param sellInOnePiece Set StackObjectsCount to 1
|
|
||||||
* @returns IRagfairOffer
|
* @returns IRagfairOffer
|
||||||
*/
|
*/
|
||||||
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
/**
|
/**
|
||||||
* Create an offer object ready to send to ragfairOfferService.addOffer()
|
* Create an offer object ready to send to ragfairOfferService.addOffer()
|
||||||
* @param userID Owner of the offer
|
* @param userID Owner of the offer
|
||||||
@ -67,17 +66,16 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param items Items in the offer
|
* @param items Items in the offer
|
||||||
* @param barterScheme Cost of item (currency or barter)
|
* @param barterScheme Cost of item (currency or barter)
|
||||||
* @param loyalLevel Loyalty level needed to buy item
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
* @param price Price of offer
|
|
||||||
* @param sellInOnePiece Set StackObjectsCount to 1
|
* @param sellInOnePiece Set StackObjectsCount to 1
|
||||||
* @returns IRagfairOffer
|
* @returns IRagfairOffer
|
||||||
*/
|
*/
|
||||||
protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
protected createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
/**
|
/**
|
||||||
* Calculate the offer price that's listed on the flea listing
|
* Calculate the offer price that's listed on the flea listing
|
||||||
* @param offerRequirements barter requirements for offer
|
* @param offerRequirements barter requirements for offer
|
||||||
* @returns rouble cost of offer
|
* @returns rouble cost of offer
|
||||||
*/
|
*/
|
||||||
protected calculateOfferListingPrice(offerRequirements: OfferRequirement[]): number;
|
protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number;
|
||||||
/**
|
/**
|
||||||
* Get avatar url from trader table in db
|
* Get avatar url from trader table in db
|
||||||
* @param isTrader Is user we're getting avatar for a trader
|
* @param isTrader Is user we're getting avatar for a trader
|
||||||
@ -137,7 +135,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param itemDetails raw db item details
|
* @param itemDetails raw db item details
|
||||||
* @returns Item array
|
* @returns Item array
|
||||||
*/
|
*/
|
||||||
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Generate trader offers on flea using the traders assort data
|
* Generate trader offers on flea using the traders assort data
|
||||||
* @param traderID Trader to generate offers for
|
* @param traderID Trader to generate offers for
|
||||||
@ -151,7 +149,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param itemDetails db details of first item
|
* @param itemDetails db details of first item
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getItemCondition(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
|
protected randomiseItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
|
||||||
/**
|
/**
|
||||||
* Get the relevant condition id if item tpl matches in ragfair.json/condition
|
* Get the relevant condition id if item tpl matches in ragfair.json/condition
|
||||||
* @param tpl Item to look for matching condition object
|
* @param tpl Item to look for matching condition object
|
||||||
@ -184,7 +182,7 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param offerItems Items for sale in offer
|
* @param offerItems Items for sale in offer
|
||||||
* @returns Barter scheme
|
* @returns Barter scheme
|
||||||
*/
|
*/
|
||||||
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
protected createBarterBarterScheme(offerItems: Item[]): IBarterScheme[];
|
||||||
/**
|
/**
|
||||||
* Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter`
|
* Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter`
|
||||||
* @returns array with tpl/price values
|
* @returns array with tpl/price values
|
||||||
@ -196,7 +194,9 @@ export declare class RagfairOfferGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a random currency-based barter scheme for an array of items
|
* Create a random currency-based barter scheme for an array of items
|
||||||
* @param offerItems Items on offer
|
* @param offerItems Items on offer
|
||||||
|
* @param isPackOffer Is the barter scheme being created for a pack offer
|
||||||
|
* @param multipler What to multiply the resulting price by
|
||||||
* @returns Barter scheme for offer
|
* @returns Barter scheme for offer
|
||||||
*/
|
*/
|
||||||
protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[];
|
protected createCurrencyBarterScheme(offerItems: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[];
|
||||||
}
|
}
|
||||||
|
10
types/generators/ScavCaseRewardGenerator.d.ts
vendored
10
types/generators/ScavCaseRewardGenerator.d.ts
vendored
@ -25,6 +25,8 @@ export declare class ScavCaseRewardGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected scavCaseConfig: IScavCaseConfig;
|
protected scavCaseConfig: IScavCaseConfig;
|
||||||
|
protected dbItemsCache: ITemplateItem[];
|
||||||
|
protected dbAmmoItemsCache: ITemplateItem[];
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||||
@ -33,12 +35,12 @@ export declare class ScavCaseRewardGenerator {
|
|||||||
*/
|
*/
|
||||||
generate(recipeId: string): Product[];
|
generate(recipeId: string): Product[];
|
||||||
/**
|
/**
|
||||||
* Get all db items that are not blacklisted in scavcase config
|
* Get all db items that are not blacklisted in scavcase config or global blacklist
|
||||||
* @returns filtered array of db items
|
* Store in class field
|
||||||
*/
|
*/
|
||||||
protected getDbItems(): ITemplateItem[];
|
protected cacheDbItems(): void;
|
||||||
/**
|
/**
|
||||||
* Pick a number of items to be rewards, the count is defined by the values in
|
* Pick a number of items to be rewards, the count is defined by the values in `itemFilters` param
|
||||||
* @param items item pool to pick rewards from
|
* @param items item pool to pick rewards from
|
||||||
* @param itemFilters how the rewards should be filtered down (by item count)
|
* @param itemFilters how the rewards should be filtered down (by item count)
|
||||||
* @returns
|
* @returns
|
||||||
|
1
types/generators/WeatherGenerator.d.ts
vendored
1
types/generators/WeatherGenerator.d.ts
vendored
@ -52,6 +52,7 @@ export declare class WeatherGenerator {
|
|||||||
*/
|
*/
|
||||||
protected setCurrentDateTime(weather: IWeather): void;
|
protected setCurrentDateTime(weather: IWeather): void;
|
||||||
protected getWeightedWindDirection(): WindDirection;
|
protected getWeightedWindDirection(): WindDirection;
|
||||||
|
protected getWeightedClouds(): number;
|
||||||
protected getWeightedWindSpeed(): number;
|
protected getWeightedWindSpeed(): number;
|
||||||
protected getWeightedFog(): number;
|
protected getWeightedFog(): number;
|
||||||
protected getWeightedRain(): number;
|
protected getWeightedRain(): number;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { MinMax } from "../../models/common/MinMax";
|
|
||||||
import { Inventory } from "../../models/eft/common/tables/IBotBase";
|
import { Inventory } from "../../models/eft/common/tables/IBotBase";
|
||||||
|
import { GenerationData } from "../../models/eft/common/tables/IBotType";
|
||||||
import { ITemplateItem } from "../../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../../models/eft/common/tables/ITemplateItem";
|
||||||
export declare class InventoryMagGen {
|
export declare class InventoryMagGen {
|
||||||
private magCounts;
|
private magCounts;
|
||||||
@ -7,8 +7,8 @@ export declare class InventoryMagGen {
|
|||||||
private weaponTemplate;
|
private weaponTemplate;
|
||||||
private ammoTemplate;
|
private ammoTemplate;
|
||||||
private pmcInventory;
|
private pmcInventory;
|
||||||
constructor(magCounts: MinMax, magazineTemplate: ITemplateItem, weaponTemplate: ITemplateItem, ammoTemplate: ITemplateItem, pmcInventory: Inventory);
|
constructor(magCounts: GenerationData, magazineTemplate: ITemplateItem, weaponTemplate: ITemplateItem, ammoTemplate: ITemplateItem, pmcInventory: Inventory);
|
||||||
getMagCount(): MinMax;
|
getMagCount(): GenerationData;
|
||||||
getMagazineTemplate(): ITemplateItem;
|
getMagazineTemplate(): ITemplateItem;
|
||||||
getWeaponTemplate(): ITemplateItem;
|
getWeaponTemplate(): ITemplateItem;
|
||||||
getAmmoTemplate(): ITemplateItem;
|
getAmmoTemplate(): ITemplateItem;
|
||||||
|
4
types/helpers/BotDifficultyHelper.d.ts
vendored
4
types/helpers/BotDifficultyHelper.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -15,7 +15,7 @@ export declare class BotDifficultyHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
||||||
/**
|
/**
|
||||||
|
11
types/helpers/BotGeneratorHelper.d.ts
vendored
11
types/helpers/BotGeneratorHelper.d.ts
vendored
@ -2,7 +2,8 @@ import { ApplicationContext } from "../context/ApplicationContext";
|
|||||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -20,6 +21,7 @@ export declare class BotGeneratorHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Adds properties to an item
|
* Adds properties to an item
|
||||||
@ -31,6 +33,13 @@ export declare class BotGeneratorHelper {
|
|||||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||||
upd?: Upd;
|
upd?: Upd;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Randomize the HpResource for bots e.g (245/400 resources)
|
||||||
|
* @param maxResource Max resource value of medical items
|
||||||
|
* @param randomizationValues Value provided from config
|
||||||
|
* @returns Randomized value from maxHpResource
|
||||||
|
*/
|
||||||
|
protected getRandomizedResourceValue(maxResource: number, randomizationValues: IRandomisedResourceValues): number;
|
||||||
/**
|
/**
|
||||||
* Get the chance for the weapon attachment or helmet equipment to be set as activated
|
* Get the chance for the weapon attachment or helmet equipment to be set as activated
|
||||||
* @param botRole role of bot with weapon/helmet
|
* @param botRole role of bot with weapon/helmet
|
||||||
|
4
types/helpers/BotHelper.d.ts
vendored
4
types/helpers/BotHelper.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
import { MinMax } from "../models/common/MinMax";
|
||||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||||
|
import { IPmcConfig } from "../models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -15,6 +16,7 @@ export declare class BotHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get a template object for the specified botRole from bots.types db
|
* Get a template object for the specified botRole from bots.types db
|
||||||
@ -70,7 +72,7 @@ export declare class BotHelper {
|
|||||||
*/
|
*/
|
||||||
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
||||||
/**
|
/**
|
||||||
* Choose between sptBear and sptUsec at random based on the % defined in botConfig.pmc.isUsec
|
* Choose between sptBear and sptUsec at random based on the % defined in pmcConfig.isUsec
|
||||||
* @returns pmc role
|
* @returns pmc role
|
||||||
*/
|
*/
|
||||||
getRandomizedPmcRole(): string;
|
getRandomizedPmcRole(): string;
|
||||||
|
17
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
17
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
@ -1,8 +1,9 @@
|
|||||||
import { MinMax } from "../models/common/MinMax";
|
|
||||||
import { Inventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { GenerationData } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||||
|
import { ItemAddedResult } from "../models/enums/ItemAddedResult";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
@ -11,6 +12,7 @@ import { RandomUtil } from "../utils/RandomUtil";
|
|||||||
import { ContainerHelper } from "./ContainerHelper";
|
import { ContainerHelper } from "./ContainerHelper";
|
||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "./WeightedRandomHelper";
|
||||||
export declare class BotWeaponGeneratorHelper {
|
export declare class BotWeaponGeneratorHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -18,22 +20,23 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
||||||
/**
|
/**
|
||||||
* Get a randomized number of bullets for a specific magazine
|
* Get a randomized number of bullets for a specific magazine
|
||||||
* @param magCounts min and max count of magazines
|
* @param magCounts Weights of magazines
|
||||||
* @param magTemplate magazine to generate bullet count for
|
* @param magTemplate magazine to generate bullet count for
|
||||||
* @returns bullet count number
|
* @returns bullet count number
|
||||||
*/
|
*/
|
||||||
getRandomizedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
getRandomizedBulletCount(magCounts: GenerationData, magTemplate: ITemplateItem): number;
|
||||||
/**
|
/**
|
||||||
* Get a randomized count of magazines
|
* Get a randomized count of magazines
|
||||||
* @param magCounts min and max value returned value can be between
|
* @param magCounts min and max value returned value can be between
|
||||||
* @returns numerical value of magazine count
|
* @returns numerical value of magazine count
|
||||||
*/
|
*/
|
||||||
getRandomizedMagazineCount(magCounts: MinMax): number;
|
getRandomizedMagazineCount(magCounts: GenerationData): number;
|
||||||
/**
|
/**
|
||||||
* Is this magazine cylinder related (revolvers and grenade launchers)
|
* Is this magazine cylinder related (revolvers and grenade launchers)
|
||||||
* @param magazineParentName the name of the magazines parent
|
* @param magazineParentName the name of the magazines parent
|
||||||
@ -47,7 +50,7 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
* @param magTemplate template object of magazine
|
* @param magTemplate template object of magazine
|
||||||
* @returns Item array
|
* @returns Item array
|
||||||
*/
|
*/
|
||||||
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
|
createMagazineWithAmmo(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
|
||||||
/**
|
/**
|
||||||
* Add a specific number of cartridges to a bots inventory (defaults to vest and pockets)
|
* Add a specific number of cartridges to a bots inventory (defaults to vest and pockets)
|
||||||
* @param ammoTpl Ammo tpl to add to vest/pockets
|
* @param ammoTpl Ammo tpl to add to vest/pockets
|
||||||
@ -72,7 +75,7 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
* @param inventory Inventory to add item+children into
|
* @param inventory Inventory to add item+children into
|
||||||
* @returns a `boolean` indicating item was added
|
* @returns a `boolean` indicating item was added
|
||||||
*/
|
*/
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean;
|
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 slot location item wants to be placed in
|
||||||
|
6
types/helpers/DialogueHelper.d.ts
vendored
6
types/helpers/DialogueHelper.d.ts
vendored
@ -41,4 +41,10 @@ export declare class DialogueHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getMessageItemContents(messageID: string, sessionID: string, itemId: string): Item[];
|
getMessageItemContents(messageID: string, sessionID: string, itemId: string): Item[];
|
||||||
|
/**
|
||||||
|
* Get the dialogs dictionary for a profile, create if doesnt exist
|
||||||
|
* @param sessionId Session/player id
|
||||||
|
* @returns Dialog dictionary
|
||||||
|
*/
|
||||||
|
getDialogsForProfile(sessionId: string): Record<string, Dialogue>;
|
||||||
}
|
}
|
||||||
|
1
types/helpers/HealthHelper.d.ts
vendored
1
types/helpers/HealthHelper.d.ts
vendored
@ -27,6 +27,7 @@ export declare class HealthHelper {
|
|||||||
* @param request Heal request
|
* @param request Heal request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param addEffects Should effects be added or removed (default - add)
|
* @param addEffects Should effects be added or removed (default - add)
|
||||||
|
* @param deleteExistingEffects Should all prior effects be removed before apply new ones
|
||||||
*/
|
*/
|
||||||
saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||||
/**
|
/**
|
||||||
|
41
types/helpers/HideoutHelper.d.ts
vendored
41
types/helpers/HideoutHelper.d.ts
vendored
@ -51,23 +51,19 @@ export declare class HideoutHelper {
|
|||||||
* This convenience function initializes new Production Object
|
* This convenience function initializes new Production Object
|
||||||
* with all the constants.
|
* with all the constants.
|
||||||
*/
|
*/
|
||||||
initProduction(recipeId: string, productionTime: number): Production;
|
initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): Production;
|
||||||
/**
|
/**
|
||||||
* Is the provided object a Production type
|
* Is the provided object a Production type
|
||||||
* @param productive
|
* @param productive
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
isProductionType(productive: Productive): productive is Production;
|
isProductionType(productive: Productive): productive is Production;
|
||||||
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
|
||||||
/**
|
/**
|
||||||
* TODO:
|
* Apply bonus to player profile given after completing hideout upgrades
|
||||||
* After looking at the skills there doesnt seem to be a configuration per skill to boost
|
* @param pmcData Profile to add bonus to
|
||||||
* the XP gain PER skill. I THINK you should be able to put the variable "SkillProgress" (just like health has it)
|
* @param bonus Bonus to add to profile
|
||||||
* and be able to tune the skill gain PER skill, but I havent tested it and Im not sure!
|
|
||||||
* @param pmcData
|
|
||||||
* @param bonus
|
|
||||||
*/
|
*/
|
||||||
protected applySkillXPBoost(pmcData: IPmcData, bonus: StageBonus): void;
|
applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void;
|
||||||
/**
|
/**
|
||||||
* Process a players hideout, update areas that use resources + increment production timers
|
* Process a players hideout, update areas that use resources + increment production timers
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -83,6 +79,7 @@ export declare class HideoutHelper {
|
|||||||
isGeneratorOn: boolean;
|
isGeneratorOn: boolean;
|
||||||
waterCollectorHasFilter: boolean;
|
waterCollectorHasFilter: boolean;
|
||||||
};
|
};
|
||||||
|
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
@ -141,9 +138,8 @@ export declare class HideoutHelper {
|
|||||||
isGeneratorOn: boolean;
|
isGeneratorOn: boolean;
|
||||||
waterCollectorHasFilter: boolean;
|
waterCollectorHasFilter: boolean;
|
||||||
}): void;
|
}): void;
|
||||||
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
|
|
||||||
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
|
|
||||||
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): void;
|
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): void;
|
||||||
|
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
|
||||||
/**
|
/**
|
||||||
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
||||||
* @param waterFilterArea water filter area to update
|
* @param waterFilterArea water filter area to update
|
||||||
@ -153,6 +149,16 @@ export declare class HideoutHelper {
|
|||||||
* @returns Updated HideoutArea object
|
* @returns Updated HideoutArea object
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||||
|
/**
|
||||||
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
|
* @param secondsSinceServerTick Time passed
|
||||||
|
* @param totalProductionTime Total time collecting water
|
||||||
|
* @param productionProgress how far water collector has progressed
|
||||||
|
* @param baseFilterDrainRate Base drain rate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -164,7 +170,7 @@ export declare class HideoutHelper {
|
|||||||
* @param prodId Id, e.g. Water collector id
|
* @param prodId Id, e.g. Water collector id
|
||||||
* @returns seconds to produce item
|
* @returns seconds to produce item
|
||||||
*/
|
*/
|
||||||
protected getProductionTimeSeconds(prodId: string): number;
|
protected getTotalProductionTimeSeconds(prodId: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a upd object using passed in parameters
|
* Create a upd object using passed in parameters
|
||||||
* @param stackCount
|
* @param stackCount
|
||||||
@ -185,9 +191,10 @@ export declare class HideoutHelper {
|
|||||||
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
||||||
|
* @param recipe Hideout production recipe being crafted we need the ticks for
|
||||||
* @returns Amount of time elapsed in seconds
|
* @returns Amount of time elapsed in seconds
|
||||||
*/
|
*/
|
||||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean): number;
|
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean, recipe?: IHideoutProduction): number;
|
||||||
/**
|
/**
|
||||||
* Get a count of how many BTC can be gathered by the profile
|
* Get a count of how many BTC can be gathered by the profile
|
||||||
* @param pmcData Profile to look up
|
* @param pmcData Profile to look up
|
||||||
@ -210,6 +217,12 @@ export declare class HideoutHelper {
|
|||||||
* @returns Hideout management skill object
|
* @returns Hideout management skill object
|
||||||
*/
|
*/
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
||||||
|
/**
|
||||||
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
* @param pmcData Profile to get hideout consumption level level from
|
||||||
|
* @returns consumption bonus
|
||||||
|
*/
|
||||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Adjust craft time based on crafting skill level found in player profile
|
* Adjust craft time based on crafting skill level found in player profile
|
||||||
@ -235,7 +248,7 @@ export declare class HideoutHelper {
|
|||||||
*/
|
*/
|
||||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
||||||
/**
|
/**
|
||||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
* Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded
|
||||||
* @param pmcProfile Profile to upgrade wall in
|
* @param pmcProfile Profile to upgrade wall in
|
||||||
*/
|
*/
|
||||||
unlockHideoutWallInProfile(pmcProfile: IPmcData): void;
|
unlockHideoutWallInProfile(pmcProfile: IPmcData): void;
|
||||||
|
39
types/helpers/InRaidHelper.d.ts
vendored
39
types/helpers/InRaidHelper.d.ts
vendored
@ -1,7 +1,8 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData, IPostRaidPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Victim } from "../models/eft/common/tables/IBotBase";
|
import { IQuestStatus, TraderInfo, Victim } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -13,6 +14,7 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
import { InventoryHelper } from "./InventoryHelper";
|
import { InventoryHelper } from "./InventoryHelper";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
import { PaymentHelper } from "./PaymentHelper";
|
||||||
|
import { QuestHelper } from "./QuestHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -20,19 +22,21 @@ export declare class InRaidHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
protected inRaidConfig: IInRaidConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, 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
|
||||||
*/
|
*/
|
||||||
removeQuestItemsOnDeath(): boolean;
|
removeQuestItemsOnDeath(): boolean;
|
||||||
/**
|
/**
|
||||||
* Check an array of items and add an upd object to money items with a stack count of 1
|
* Check items array and add an upd object to money with a stack count of 1
|
||||||
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
||||||
* @param items Items array to check
|
* @param items Items array to check
|
||||||
*/
|
*/
|
||||||
@ -49,7 +53,7 @@ export declare class InRaidHelper {
|
|||||||
* @param victim Who was killed by player
|
* @param victim Who was killed by player
|
||||||
* @returns a numerical standing gain or loss
|
* @returns a numerical standing gain or loss
|
||||||
*/
|
*/
|
||||||
protected getStandingChangeForKill(victim: Victim): number;
|
protected getFenceStandingChangeForKillAsScav(victim: Victim): number;
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
@ -61,6 +65,14 @@ export declare class InRaidHelper {
|
|||||||
* @returns Reset profile object
|
* @returns Reset profile object
|
||||||
*/
|
*/
|
||||||
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
|
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param preRaidQuests Quests prior to starting raid
|
||||||
|
* @param postRaidQuests Quest after raid
|
||||||
|
*/
|
||||||
|
protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: IQuestStatus[], postRaidQuests: IQuestStatus[]): void;
|
||||||
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void;
|
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): 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
|
||||||
@ -68,6 +80,12 @@ export declare class InRaidHelper {
|
|||||||
* @param profileData player profile on server
|
* @param profileData player profile on server
|
||||||
*/
|
*/
|
||||||
protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
|
protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Adjust server trader settings if they differ from data sent by client
|
||||||
|
* @param tradersServerProfile Server
|
||||||
|
* @param tradersClientProfile Client
|
||||||
|
*/
|
||||||
|
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void;
|
||||||
/**
|
/**
|
||||||
* Some maps have one-time-use keys (e.g. Labs
|
* Some maps have one-time-use keys (e.g. Labs
|
||||||
* Remove the relevant key from an inventory based on the post-raid request data passed in
|
* Remove the relevant key from an inventory based on the post-raid request data passed in
|
||||||
@ -80,22 +98,13 @@ export declare class InRaidHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
*/
|
*/
|
||||||
protected setPlayerInRaidLocationStatusToNone(sessionID: string): void;
|
protected setPlayerInRaidLocationStatusToNone(sessionID: string): void;
|
||||||
/**
|
|
||||||
* Adds SpawnedInSession property to items found in a raid
|
|
||||||
* Removes SpawnedInSession for non-scav players if item was taken into raid with SpawnedInSession = true
|
|
||||||
* @param preRaidProfile profile to update
|
|
||||||
* @param postRaidProfile profile to update inventory contents of
|
|
||||||
* @param isPlayerScav Was this a p scav raid
|
|
||||||
* @returns profile with FiR items properly tagged
|
|
||||||
*/
|
|
||||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
|
||||||
/**
|
/**
|
||||||
* Iterate over inventory items and remove the property that defines an item as Found in Raid
|
* Iterate over inventory items and remove the property that defines an item as Found in Raid
|
||||||
* Only removes property if item had FiR when entering raid
|
* Only removes property if item had FiR when entering raid
|
||||||
* @param postRaidProfile profile to update items for
|
* @param postRaidProfile profile to update items for
|
||||||
* @returns Updated profile with SpawnedInSession removed
|
* @returns Updated profile with SpawnedInSession removed
|
||||||
*/
|
*/
|
||||||
removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPmcData): IPmcData;
|
removeSpawnedInSessionPropertyFromItems(postRaidProfile: IPostRaidPmcData): IPostRaidPmcData;
|
||||||
/**
|
/**
|
||||||
* Update a players inventory post-raid
|
* Update a players inventory post-raid
|
||||||
* Remove equipped items from pre-raid
|
* Remove equipped items from pre-raid
|
||||||
|
72
types/helpers/InventoryHelper.d.ts
vendored
72
types/helpers/InventoryHelper.d.ts
vendored
@ -1,9 +1,11 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Inventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||||
|
import { IInventoryRemoveRequestData } from "../models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||||
@ -22,7 +24,9 @@ import { PaymentHelper } from "./PaymentHelper";
|
|||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
import { TraderAssortHelper } from "./TraderAssortHelper";
|
import { TraderAssortHelper } from "./TraderAssortHelper";
|
||||||
export interface OwnerInventoryItems {
|
export interface OwnerInventoryItems {
|
||||||
|
/** Inventory items from source */
|
||||||
from: Item[];
|
from: Item[];
|
||||||
|
/** Inventory items at destination */
|
||||||
to: Item[];
|
to: Item[];
|
||||||
sameInventory: boolean;
|
sameInventory: boolean;
|
||||||
isMail: boolean;
|
isMail: boolean;
|
||||||
@ -56,9 +60,20 @@ export declare class InventoryHelper {
|
|||||||
* @param useSortingTable Allow items to go into sorting table when stash has no space
|
* @param useSortingTable Allow items to go into sorting table when stash has no space
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
|
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse;
|
||||||
(): void;
|
/**
|
||||||
}, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse;
|
* Take the given item, find a free slot in passed in inventory and place it there
|
||||||
|
* If no space in inventory, place in sorting table
|
||||||
|
* @param itemToAdd Item to add to inventory
|
||||||
|
* @param stashFS2D Two dimentional stash map
|
||||||
|
* @param sortingTableFS2D Two dimentional sorting table stash map
|
||||||
|
* @param itemLib
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param useSortingTable Should sorting table be used for overflow items when no inventory space for item
|
||||||
|
* @param output Client output object
|
||||||
|
* @returns Client error output if placing item failed
|
||||||
|
*/
|
||||||
|
protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Add ammo to ammo boxes
|
* Add ammo to ammo boxes
|
||||||
* @param itemToAdd Item to check is ammo box
|
* @param itemToAdd Item to check is ammo box
|
||||||
@ -66,8 +81,10 @@ export declare class InventoryHelper {
|
|||||||
* @param output IItemEventRouterResponse object
|
* @param output IItemEventRouterResponse object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param pmcData Profile to add ammobox to
|
* @param pmcData Profile to add ammobox to
|
||||||
|
* @param output object to send to client
|
||||||
|
* @param foundInRaid should ammo be FiR
|
||||||
*/
|
*/
|
||||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse): void;
|
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param assortItems Items to add to inventory
|
* @param assortItems Items to add to inventory
|
||||||
@ -76,23 +93,31 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
* @param pmcData Profile to remove item from
|
* Also deletes child items
|
||||||
|
* @param profile Profile to remove item from (pmc or scav)
|
||||||
* @param itemId Items id to remove
|
* @param itemId Items id to remove
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
|
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||||
/**
|
/**
|
||||||
|
* Return the inventory that needs to be modified (scav/pmc etc)
|
||||||
|
* Changes made to result apply to character inventory
|
||||||
* Based on the item action, determine whose inventories we should be looking at for from and to.
|
* Based on the item action, determine whose inventories we should be looking at for from and to.
|
||||||
|
* @param request Item interaction request
|
||||||
|
* @param sessionId Session id / playerid
|
||||||
|
* @returns OwnerInventoryItems with inventory of player/scav to adjust
|
||||||
*/
|
*/
|
||||||
getOwnerInventoryItems(body: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData, sessionID: string): OwnerInventoryItems;
|
getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData, sessionId: string): OwnerInventoryItems;
|
||||||
/**
|
/**
|
||||||
* Made a 2d array table with 0 - free slot and 1 - used slot
|
* Made a 2d array table with 0 - free slot and 1 - used slot
|
||||||
* @param {Object} pmcData
|
* @param {Object} pmcData
|
||||||
@ -101,19 +126,36 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
||||||
protected getSortingTableSlotMap(pmcData: IPmcData): number[][];
|
protected getSortingTableSlotMap(pmcData: IPmcData): number[][];
|
||||||
|
/**
|
||||||
|
* Get Player Stash Proper Size
|
||||||
|
* @param sessionID Playerid
|
||||||
|
* @returns Array of 2 values, x and y stash size
|
||||||
|
*/
|
||||||
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
||||||
|
/**
|
||||||
|
* Get the players stash items tpl
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @returns Stash tpl
|
||||||
|
*/
|
||||||
protected getStashType(sessionID: string): string;
|
protected getStashType(sessionID: string): string;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to transfer an item from one profile to another.
|
* Internal helper function to transfer an item from one profile to another.
|
||||||
* fromProfileData: Profile of the source.
|
* @param fromItems Inventory of the source (can be non-player)
|
||||||
* toProfileData: Profile of the destination.
|
* @param toItems Inventory of the destination
|
||||||
* body: Move request
|
* @param body Move request
|
||||||
*/
|
*/
|
||||||
moveItemToProfile(fromItems: Item[], toItems: Item[], body: IInventoryMoveRequestData): void;
|
moveItemToProfile(fromItems: Item[], toItems: Item[], body: IInventoryMoveRequestData): void;
|
||||||
/**
|
/**
|
||||||
* Internal helper function to move item within the same profile_f.
|
* Internal helper function to move item within the same profile_f.
|
||||||
*/
|
* @param pmcData profile to edit
|
||||||
moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): void;
|
* @param inventoryItems
|
||||||
|
* @param moveRequest
|
||||||
|
* @returns True if move was successful
|
||||||
|
*/
|
||||||
|
moveItemInternal(pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData): {
|
||||||
|
success: boolean;
|
||||||
|
errorMessage?: string;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access
|
* Update fast panel bindings when an item is moved into a container that doesnt allow quick slot access
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
64
types/helpers/ItemHelper.d.ts
vendored
64
types/helpers/ItemHelper.d.ts
vendored
@ -26,6 +26,7 @@ declare class ItemHelper {
|
|||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
@ -55,6 +56,13 @@ declare class ItemHelper {
|
|||||||
* @returns Price in roubles
|
* @returns Price in roubles
|
||||||
*/
|
*/
|
||||||
getItemPrice(tpl: string): number;
|
getItemPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||||
|
* found in the handbook. If the price can't be found at all return 0
|
||||||
|
* @param tpl Item to look price up of
|
||||||
|
* @returns Price in roubles
|
||||||
|
*/
|
||||||
|
getItemMaxPrice(tpl: string): number;
|
||||||
/**
|
/**
|
||||||
* Get the static (handbook) price in roubles for an item by tpl
|
* Get the static (handbook) price in roubles for an item by tpl
|
||||||
* @param tpl Items tpl id to look up price
|
* @param tpl Items tpl id to look up price
|
||||||
@ -67,6 +75,11 @@ declare class ItemHelper {
|
|||||||
* @returns Price in roubles (undefined if not found)
|
* @returns Price in roubles (undefined if not found)
|
||||||
*/
|
*/
|
||||||
getDynamicItemPrice(tpl: string): number;
|
getDynamicItemPrice(tpl: string): number;
|
||||||
|
/**
|
||||||
|
* Update items upd.StackObjectsCount to be 1 if its upd is missing or StackObjectsCount is undefined
|
||||||
|
* @param item Item to update
|
||||||
|
* @returns Fixed item
|
||||||
|
*/
|
||||||
fixItemStackCount(item: Item): Item;
|
fixItemStackCount(item: Item): Item;
|
||||||
/**
|
/**
|
||||||
* AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content.
|
* AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content.
|
||||||
@ -125,19 +138,19 @@ declare class ItemHelper {
|
|||||||
getItemQualityModifier(item: Item): number;
|
getItemQualityModifier(item: Item): number;
|
||||||
/**
|
/**
|
||||||
* Get a quality value based on a repairable items (weapon/armor) current state between current and max durability
|
* Get a quality value based on a repairable items (weapon/armor) current state between current and max durability
|
||||||
* @param itemDetails
|
* @param itemDetails Db details for item we want quality value for
|
||||||
* @param repairable repairable object
|
* @param repairable Repairable properties
|
||||||
* @param item
|
* @param item Item quality value is for
|
||||||
* @returns a number between 0 and 1
|
* @returns A number between 0 and 1
|
||||||
*/
|
*/
|
||||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||||
/**
|
/**
|
||||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||||
* @param items
|
* @param items Array of items (item + possible children)
|
||||||
* @param itemID
|
* @param itemId Parent items id
|
||||||
* @returns an array of strings
|
* @returns an array of strings
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenByItems(items: Item[], itemID: string): string[];
|
findAndReturnChildrenByItems(items: Item[], itemId: string): string[];
|
||||||
/**
|
/**
|
||||||
* A variant of findAndReturnChildren where the output is list of item objects instead of their ids.
|
* A variant of findAndReturnChildren where the output is list of item objects instead of their ids.
|
||||||
* @param items
|
* @param items
|
||||||
@ -164,12 +177,6 @@ declare class ItemHelper {
|
|||||||
* @returns true if it is a dogtag
|
* @returns true if it is a dogtag
|
||||||
*/
|
*/
|
||||||
isDogtag(tpl: string): boolean;
|
isDogtag(tpl: string): boolean;
|
||||||
/**
|
|
||||||
* Can the item passed in be sold to a trader because it is raw money
|
|
||||||
* @param tpl Item template id to check
|
|
||||||
* @returns true if unsellable
|
|
||||||
*/
|
|
||||||
isNotSellable(tpl: string): boolean;
|
|
||||||
/**
|
/**
|
||||||
* Gets the identifier for a child using slotId, locationX and locationY.
|
* Gets the identifier for a child using slotId, locationX and locationY.
|
||||||
* @param item
|
* @param item
|
||||||
@ -183,19 +190,19 @@ declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
isItemTplStackable(tpl: string): boolean;
|
isItemTplStackable(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* split item stack if it exceeds its StackMaxSize property
|
* split item stack if it exceeds its items StackMaxSize property
|
||||||
* @param itemToSplit item being split into smaller stacks
|
* @param itemToSplit Item to split into smaller stacks
|
||||||
* @returns Array of split items
|
* @returns Array of split items
|
||||||
*/
|
*/
|
||||||
splitStack(itemToSplit: Item): Item[];
|
splitStack(itemToSplit: Item): Item[];
|
||||||
/**
|
/**
|
||||||
* Find Barter items in the inventory
|
* Find Barter items from array of items
|
||||||
* @param {string} by tpl or id
|
* @param {string} by tpl or id
|
||||||
* @param {Object} pmcData
|
* @param {Item[]} items Array of items to iterate over
|
||||||
* @param {string} barterItemId
|
* @param {string} barterItemId
|
||||||
* @returns Array of Item objects
|
* @returns Array of Item objects
|
||||||
*/
|
*/
|
||||||
findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[];
|
findBarterItems(by: "tpl" | "id", items: Item[], barterItemId: string): Item[];
|
||||||
/**
|
/**
|
||||||
* Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table)
|
* Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table)
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -237,6 +244,14 @@ declare class ItemHelper {
|
|||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Check if item is stored inside of a container
|
||||||
|
* @param item Item to check is inside of container
|
||||||
|
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||||
|
* @param items Inventory with child parent items to check
|
||||||
|
* @returns True when item is in container
|
||||||
|
*/
|
||||||
|
itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Add child items (cartridges) to a magazine
|
* Add child items (cartridges) to a magazine
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazine Magazine to add child items to
|
||||||
@ -254,10 +269,21 @@ declare class ItemHelper {
|
|||||||
* @param minSizePercent % the magazine must be filled to
|
* @param minSizePercent % the magazine must be filled to
|
||||||
*/
|
*/
|
||||||
fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void;
|
fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void;
|
||||||
|
/**
|
||||||
|
* Choose a random bullet type from the list of possible a magazine has
|
||||||
|
* @param magTemplate Magazine template from Db
|
||||||
|
* @returns Tpl of cartridge
|
||||||
|
*/
|
||||||
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
||||||
|
/**
|
||||||
|
* Chose a randomly weighted cartridge that fits
|
||||||
|
* @param caliber Desired caliber
|
||||||
|
* @param staticAmmoDist Cartridges and thier weights
|
||||||
|
* @returns Tpl of cartrdige
|
||||||
|
*/
|
||||||
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
||||||
/**
|
/**
|
||||||
*
|
* Create a basic cartrige object
|
||||||
* @param parentId container cartridges will be placed in
|
* @param parentId container cartridges will be placed in
|
||||||
* @param ammoTpl Cartridge to insert
|
* @param ammoTpl Cartridge to insert
|
||||||
* @param stackCount Count of cartridges inside parent
|
* @param stackCount Count of cartridges inside parent
|
||||||
|
5
types/helpers/PresetHelper.d.ts
vendored
5
types/helpers/PresetHelper.d.ts
vendored
@ -13,6 +13,11 @@ export declare class PresetHelper {
|
|||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
getPreset(id: string): IPreset;
|
getPreset(id: string): IPreset;
|
||||||
getPresets(templateId: string): IPreset[];
|
getPresets(templateId: string): IPreset[];
|
||||||
|
/**
|
||||||
|
* Get the default preset for passed in weapon id
|
||||||
|
* @param templateId Weapon id to get preset for
|
||||||
|
* @returns Null if no default preset, otherwise IPreset
|
||||||
|
*/
|
||||||
getDefaultPreset(templateId: string): IPreset;
|
getDefaultPreset(templateId: string): IPreset;
|
||||||
getBaseItemTpl(presetId: string): string;
|
getBaseItemTpl(presetId: string): string;
|
||||||
}
|
}
|
||||||
|
6
types/helpers/ProfileHelper.d.ts
vendored
6
types/helpers/ProfileHelper.d.ts
vendored
@ -21,11 +21,11 @@ export declare class ProfileHelper {
|
|||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset started quest condtions in player profile
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param conditionIds Condition ids that need to be reset/removed
|
* @param questConditionId Quest with condition to remove
|
||||||
*/
|
*/
|
||||||
resetProfileQuestCondition(sessionID: string, conditionIds: string[]): void;
|
removeCompletedQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record<string, string>): void;
|
||||||
/**
|
/**
|
||||||
* Get all profiles from server
|
* Get all profiles from server
|
||||||
* @returns Dictionary of profiles
|
* @returns Dictionary of profiles
|
||||||
|
1
types/helpers/QuestConditionHelper.d.ts
vendored
1
types/helpers/QuestConditionHelper.d.ts
vendored
@ -3,5 +3,6 @@ export declare class QuestConditionHelper {
|
|||||||
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
|
getStandingConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
||||||
}
|
}
|
||||||
|
37
types/helpers/QuestHelper.d.ts
vendored
37
types/helpers/QuestHelper.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Quest } from "../models/eft/common/tables/IBotBase";
|
import { IQuestStatus } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -21,6 +21,7 @@ import { DialogueHelper } from "./DialogueHelper";
|
|||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
import { PaymentHelper } from "./PaymentHelper";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
|
import { QuestConditionHelper } from "./QuestConditionHelper";
|
||||||
import { RagfairServerHelper } from "./RagfairServerHelper";
|
import { RagfairServerHelper } from "./RagfairServerHelper";
|
||||||
import { TraderHelper } from "./TraderHelper";
|
import { TraderHelper } from "./TraderHelper";
|
||||||
export declare class QuestHelper {
|
export declare class QuestHelper {
|
||||||
@ -29,6 +30,7 @@ export declare class QuestHelper {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
@ -41,7 +43,7 @@ export declare class QuestHelper {
|
|||||||
protected mailSendService: MailSendService;
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get status of a quest in player profile by its id
|
* Get status of a quest in player profile by its id
|
||||||
* @param pmcData Profile to search
|
* @param pmcData Profile to search
|
||||||
@ -84,7 +86,15 @@ export declare class QuestHelper {
|
|||||||
* @param profile Player profile
|
* @param profile Player profile
|
||||||
* @returns true if loyalty is high enough to fulfill quest requirement
|
* @returns true if loyalty is high enough to fulfill quest requirement
|
||||||
*/
|
*/
|
||||||
|
traderLoyaltyLevelRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Check if trader has sufficient standing to fulfill quest requirement
|
||||||
|
* @param questProperties Quest props
|
||||||
|
* @param profile Player profile
|
||||||
|
* @returns true if standing is high enough to fulfill quest requirement
|
||||||
|
*/
|
||||||
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||||
|
protected compareAvailableForValues(current: number, required: number, compareMethod: string): boolean;
|
||||||
/**
|
/**
|
||||||
* take reward item from quest and set FiR status + fix stack sizes + fix mod Ids
|
* take reward item from quest and set FiR status + fix stack sizes + fix mod Ids
|
||||||
* @param reward Reward item to fix
|
* @param reward Reward item to fix
|
||||||
@ -104,28 +114,29 @@ export declare class QuestHelper {
|
|||||||
* @param newState State the new quest should be in when returned
|
* @param newState State the new quest should be in when returned
|
||||||
* @param acceptedQuest Details of accepted quest from client
|
* @param acceptedQuest Details of accepted quest from client
|
||||||
*/
|
*/
|
||||||
getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): Quest;
|
getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): IQuestStatus;
|
||||||
/**
|
/**
|
||||||
* Get quests that can be shown to player after starting a quest
|
* Get quests that can be shown to player after starting a quest
|
||||||
* @param startedQuestId Quest started by player
|
* @param startedQuestId Quest started by player
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started
|
* @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started
|
||||||
*/
|
*/
|
||||||
acceptedUnlocked(startedQuestId: string, sessionID: string): IQuest[];
|
getNewlyAccessibleQuestsWhenStartingQuest(startedQuestId: string, sessionID: string): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Get quests that can be shown to player after failing a quest
|
* Get quests that can be shown to player after failing a quest
|
||||||
* @param failedQuestId Id of the quest failed by player
|
* @param failedQuestId Id of the quest failed by player
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @returns
|
* @returns IQuest array
|
||||||
*/
|
*/
|
||||||
failedUnlocked(failedQuestId: string, sessionId: string): IQuest[];
|
failedUnlocked(failedQuestId: string, sessionId: string): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Adjust quest money rewards by passed in multiplier
|
* Adjust quest money rewards by passed in multiplier
|
||||||
* @param quest Quest to multiple money rewards
|
* @param quest Quest to multiple money rewards
|
||||||
* @param multiplier Value to adjust money rewards by
|
* @param multiplier Value to adjust money rewards by
|
||||||
|
* @param questStatus Status of quest to apply money boost to rewards of
|
||||||
* @returns Updated quest
|
* @returns Updated quest
|
||||||
*/
|
*/
|
||||||
applyMoneyBoost(quest: IQuest, multiplier: number): IQuest;
|
applyMoneyBoost(quest: IQuest, multiplier: number, questStatus: QuestStatus): IQuest;
|
||||||
/**
|
/**
|
||||||
* Sets the item stack to new value, or delete the item if value <= 0
|
* Sets the item stack to new value, or delete the item if value <= 0
|
||||||
* // TODO maybe merge this function and the one from customization
|
* // TODO maybe merge this function and the one from customization
|
||||||
@ -160,9 +171,10 @@ export declare class QuestHelper {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param failRequest Fail quest request data
|
* @param failRequest Fail quest request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
* @param output Client output
|
||||||
* @returns Item event router response
|
* @returns Item event router response
|
||||||
*/
|
*/
|
||||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Get List of All Quests from db
|
* Get List of All Quests from db
|
||||||
* NOT CLONED
|
* NOT CLONED
|
||||||
@ -217,17 +229,18 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
|
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Get players intel center bonus from profile
|
* Get players money reward bonus from profile
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @returns bonus as a percent
|
* @returns bonus as a percent
|
||||||
*/
|
*/
|
||||||
protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
|
protected getQuestMoneyRewardBonus(pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Find quest with 'findItem' requirement that needs the item tpl be handed in
|
* Find quest with 'findItem' condition that needs the item tpl be handed in
|
||||||
* @param itemTpl item tpl to look for
|
* @param itemTpl item tpl to look for
|
||||||
* @returns 'FindItem' condition id
|
* @param questIds Quests to search through for the findItem condition
|
||||||
|
* @returns quest id with 'FindItem' condition id
|
||||||
*/
|
*/
|
||||||
getFindItemIdForQuestHandIn(itemTpl: string): string[];
|
getFindItemConditionByQuestItem(itemTpl: string, questIds: string[], allQuests: IQuest[]): Record<string, string>;
|
||||||
/**
|
/**
|
||||||
* Add all quests to a profile with the provided statuses
|
* Add all quests to a profile with the provided statuses
|
||||||
* @param pmcProfile profile to update
|
* @param pmcProfile profile to update
|
||||||
|
45
types/helpers/RagfairOfferHelper.d.ts
vendored
45
types/helpers/RagfairOfferHelper.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
@ -13,10 +14,10 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { MailSendService } from "../services/MailSendService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { DialogueHelper } from "./DialogueHelper";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { PaymentHelper } from "./PaymentHelper";
|
import { PaymentHelper } from "./PaymentHelper";
|
||||||
import { PresetHelper } from "./PresetHelper";
|
import { PresetHelper } from "./PresetHelper";
|
||||||
@ -33,7 +34,6 @@ export declare class RagfairOfferHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected dialogueHelper: DialogueHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
@ -44,15 +44,16 @@ export declare class RagfairOfferHelper {
|
|||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected static goodSoldTemplate: string;
|
protected static goodSoldTemplate: string;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
||||||
* @param searchRequest
|
* @param searchRequest Data from client
|
||||||
* @param itemsToAdd
|
* @param itemsToAdd ragfairHelper.filterCategories()
|
||||||
* @param traderAssorts Trader assorts
|
* @param traderAssorts Trader assorts
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns Offers the player should see
|
* @returns Offers the player should see
|
||||||
@ -67,6 +68,13 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Check if offer is from trader standing the player does not have
|
||||||
|
* @param offer Offer to check
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
* @returns True if item is locked, false if item is purchaseable
|
||||||
|
*/
|
||||||
|
protected traderOfferLockedBehindLoyaltyLevel(offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||||
/**
|
/**
|
||||||
* Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme
|
* Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme
|
||||||
* @param offer Offer to check is quest locked
|
* @param offer Offer to check is quest locked
|
||||||
@ -112,27 +120,42 @@ export declare class RagfairOfferHelper {
|
|||||||
*/
|
*/
|
||||||
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Delete an offer from a desired profile
|
* Delete an offer from a desired profile and from ragfair offers
|
||||||
* @param sessionID Session id of profile to delete offer from
|
* @param sessionID Session id of profile to delete offer from
|
||||||
* @param offerId Offer id to delete
|
* @param offerId Id of offer to delete
|
||||||
*/
|
*/
|
||||||
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
|
protected deleteOfferById(sessionID: string, offerId: string): void;
|
||||||
/**
|
/**
|
||||||
* Complete the selling of players' offer
|
* Complete the selling of players' offer
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param offer Sold offer details
|
* @param offer Sold offer details
|
||||||
* @param boughtAmount Amount item was purchased for
|
* @param boughtAmount Amount item was purchased for
|
||||||
* @returns Client response
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a localised message for when players offer has sold on flea
|
||||||
|
* @param itemTpl Item sold
|
||||||
|
* @param boughtAmount How many were purchased
|
||||||
|
* @returns Localised message text
|
||||||
|
*/
|
||||||
|
protected getLocalisedOfferSoldMessage(itemTpl: string, boughtAmount: number): string;
|
||||||
/**
|
/**
|
||||||
* Should a ragfair offer be visible to the player
|
* Should a ragfair offer be visible to the player
|
||||||
* @param info Search request
|
* @param searchRequest Search request
|
||||||
* @param itemsToAdd ?
|
* @param itemsToAdd ?
|
||||||
* @param traderAssorts Trader assort items
|
* @param traderAssorts Trader assort items
|
||||||
* @param offer The flea offer
|
* @param offer The flea offer
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns True = should be shown to player
|
* @returns True = should be shown to player
|
||||||
*/
|
*/
|
||||||
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Is items quality value within desired range
|
||||||
|
* @param item Item to check quality of
|
||||||
|
* @param min Desired minimum quality
|
||||||
|
* @param max Desired maximum quality
|
||||||
|
* @returns True if in range
|
||||||
|
*/
|
||||||
|
protected itemQualityInRange(item: Item, min: number, max: number): boolean;
|
||||||
}
|
}
|
||||||
|
4
types/helpers/RagfairSellHelper.d.ts
vendored
4
types/helpers/RagfairSellHelper.d.ts
vendored
@ -13,12 +13,12 @@ export declare class RagfairSellHelper {
|
|||||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, 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 baseChancePercent Base chance to sell item
|
|
||||||
* @param averageOfferPriceRub Price of average offer in roubles
|
* @param averageOfferPriceRub Price of average offer in roubles
|
||||||
* @param playerListedPriceRub Price player listed item for in roubles
|
* @param playerListedPriceRub Price player listed item for in roubles
|
||||||
|
* @param qualityMultiplier Quality multipler of item being sold
|
||||||
* @returns percent value
|
* @returns percent value
|
||||||
*/
|
*/
|
||||||
calculateSellChance(baseChancePercent: number, averageOfferPriceRub: number, playerListedPriceRub: 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
|
* 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 playerListedPriceRub Price player listed item for in roubles
|
||||||
|
1
types/helpers/RepairHelper.d.ts
vendored
1
types/helpers/RepairHelper.d.ts
vendored
@ -21,6 +21,7 @@ export declare class RepairHelper {
|
|||||||
* @param isArmor Is item being repaired a piece of armor
|
* @param isArmor Is item being repaired a piece of armor
|
||||||
* @param amountToRepair how many unit of durability to repair
|
* @param amountToRepair how many unit of durability to repair
|
||||||
* @param useRepairKit Is item being repaired with a repair kit
|
* @param useRepairKit Is item being repaired with a repair kit
|
||||||
|
* @param traderQualityMultipler Trader quality value from traders base json
|
||||||
* @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;
|
||||||
|
5
types/helpers/TradeHelper.d.ts
vendored
5
types/helpers/TradeHelper.d.ts
vendored
@ -39,12 +39,13 @@ export declare class TradeHelper {
|
|||||||
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse;
|
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Sell item to trader
|
* Sell item to trader
|
||||||
* @param pmcData Profile to update
|
* @param profileWithItemsToSell Profile to remove items from
|
||||||
|
* @param profileToReceiveMoney Profile to accept the money for selling item
|
||||||
* @param sellRequest Request data
|
* @param sellRequest Request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
sellItem(pmcData: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment the assorts buy count by number of items purchased
|
* Increment the assorts buy count by number of items purchased
|
||||||
* Show error on screen if player attempts to buy more than what the buy max allows
|
* Show error on screen if player attempts to buy more than what the buy max allows
|
||||||
|
50
types/helpers/TraderHelper.d.ts
vendored
50
types/helpers/TraderHelper.d.ts
vendored
@ -1,4 +1,6 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ProfileTraderTemplate } from "../models/eft/common/tables/IProfileTemplate";
|
||||||
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase, LoyaltyLevel } from "../models/eft/common/tables/ITrader";
|
||||||
import { Traders } from "../models/enums/Traders";
|
import { Traders } from "../models/enums/Traders";
|
||||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
@ -34,7 +36,19 @@ export declare class TraderHelper {
|
|||||||
protected highestTraderBuyPriceItems: Record<string, number>;
|
protected highestTraderBuyPriceItems: Record<string, number>;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, handbookHelper: HandbookHelper, itemHelper: ItemHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
getTrader(traderID: string, sessionID: string): ITraderBase;
|
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||||
getTraderAssortsById(traderId: string): ITraderAssort;
|
/**
|
||||||
|
* Get all assort data for a particular trader
|
||||||
|
* @param traderId Trader to get assorts for
|
||||||
|
* @returns ITraderAssort
|
||||||
|
*/
|
||||||
|
getTraderAssortsByTraderId(traderId: string): ITraderAssort;
|
||||||
|
/**
|
||||||
|
* Retrieve the Item from a traders assort data by its id
|
||||||
|
* @param traderId Trader to get assorts for
|
||||||
|
* @param assortId Id of assort to find
|
||||||
|
* @returns Item object
|
||||||
|
*/
|
||||||
|
getTraderAssortItemByAssortId(traderId: string, assortId: string): Item;
|
||||||
/**
|
/**
|
||||||
* Reset a profiles trader data back to its initial state as seen by a level 1 player
|
* Reset a profiles trader data back to its initial state as seen by a level 1 player
|
||||||
* Does NOT take into account different profile levels
|
* Does NOT take into account different profile levels
|
||||||
@ -42,6 +56,7 @@ 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;
|
||||||
|
protected getStartingStanding(traderId: string, rawProfileTemplate: ProfileTraderTemplate): number;
|
||||||
/**
|
/**
|
||||||
* Alter a traders unlocked status
|
* Alter a traders unlocked status
|
||||||
* @param traderId Trader to alter
|
* @param traderId Trader to alter
|
||||||
@ -65,10 +80,10 @@ export declare class TraderHelper {
|
|||||||
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
||||||
/**
|
/**
|
||||||
* Calculate traders level based on exp amount and increments level if over threshold
|
* Calculate traders level based on exp amount and increments level if over threshold
|
||||||
* @param traderID trader to process
|
* @param traderID trader to check standing of
|
||||||
* @param sessionID session id
|
* @param pmcData profile to update trader in
|
||||||
*/
|
*/
|
||||||
lvlUp(traderID: string, sessionID: string): void;
|
lvlUp(traderID: string, pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get the next update timestamp for a trader
|
* Get the next update timestamp for a trader
|
||||||
* @param traderID Trader to look up update value for
|
* @param traderID Trader to look up update value for
|
||||||
@ -113,4 +128,31 @@ export declare class TraderHelper {
|
|||||||
* @returns Traders key
|
* @returns Traders key
|
||||||
*/
|
*/
|
||||||
getTraderById(traderId: string): Traders;
|
getTraderById(traderId: string): Traders;
|
||||||
|
/**
|
||||||
|
* Validates that the provided traderEnumValue exists in the Traders enum. If the value is valid, it returns the
|
||||||
|
* same enum value, effectively serving as a trader ID; otherwise, it logs an error and returns an empty string.
|
||||||
|
* This method provides a runtime check to prevent undefined behavior when using the enum as a dictionary key.
|
||||||
|
*
|
||||||
|
* For example, instead of this:
|
||||||
|
* `const traderId = Traders[Traders.PRAPOR];`
|
||||||
|
*
|
||||||
|
* You can use safely use this:
|
||||||
|
* `const traderId = this.traderHelper.getValidTraderIdByEnumValue(Traders.PRAPOR);`
|
||||||
|
*
|
||||||
|
* @param traderEnumValue The trader enum value to validate
|
||||||
|
* @returns The validated trader enum value as a string, or an empty string if invalid
|
||||||
|
*/
|
||||||
|
getValidTraderIdByEnumValue(traderEnumValue: Traders): string;
|
||||||
|
/**
|
||||||
|
* Does the 'Traders' enum has a value that matches the passed in parameter
|
||||||
|
* @param key Value to check for
|
||||||
|
* @returns True, values exists in Traders enum as a value
|
||||||
|
*/
|
||||||
|
traderEnumHasKey(key: string): boolean;
|
||||||
|
/**
|
||||||
|
* Accepts a trader id
|
||||||
|
* @param traderId Trader id
|
||||||
|
* @returns Ttrue if Traders enum has the param as a value
|
||||||
|
*/
|
||||||
|
traderEnumHasValue(traderId: string): boolean;
|
||||||
}
|
}
|
||||||
|
2
types/helpers/WeightedRandomHelper.d.ts
vendored
2
types/helpers/WeightedRandomHelper.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
export declare class WeightedRandomHelper {
|
export declare class WeightedRandomHelper {
|
||||||
/**
|
/**
|
||||||
* USE getWeightedValue() WHERE POSSIBLE
|
* @deprecated USE getWeightedValue() WHERE POSSIBLE
|
||||||
* Gets a tplId from a weighted dictionary
|
* Gets a tplId from a weighted dictionary
|
||||||
* @param {tplId: weighting[]} itemArray
|
* @param {tplId: weighting[]} itemArray
|
||||||
* @returns tplId
|
* @returns tplId
|
||||||
|
4
types/loaders/PreAkiModLoader.d.ts
vendored
4
types/loaders/PreAkiModLoader.d.ts
vendored
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -35,6 +37,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
getImportedModDetails(): Record<string, IPackageJsonData>;
|
getImportedModDetails(): Record<string, IPackageJsonData>;
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
protected importMods(): Promise<void>;
|
protected importMods(): Promise<void>;
|
||||||
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData Dictionary of mod package.json data
|
||||||
@ -62,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
25
types/models/eft/common/IGlobals.d.ts
vendored
25
types/models/eft/common/IGlobals.d.ts
vendored
@ -29,6 +29,7 @@ export interface IConfig {
|
|||||||
TradingUnlimitedItems: boolean;
|
TradingUnlimitedItems: boolean;
|
||||||
MaxLoyaltyLevelForAll: boolean;
|
MaxLoyaltyLevelForAll: boolean;
|
||||||
GlobalLootChanceModifier: number;
|
GlobalLootChanceModifier: number;
|
||||||
|
GraphicSettings: IGraphicSettings;
|
||||||
TimeBeforeDeploy: number;
|
TimeBeforeDeploy: number;
|
||||||
TimeBeforeDeployLocal: number;
|
TimeBeforeDeployLocal: number;
|
||||||
TradingSetting: number;
|
TradingSetting: number;
|
||||||
@ -79,6 +80,7 @@ export interface IConfig {
|
|||||||
SkillExpPerLevel: number;
|
SkillExpPerLevel: number;
|
||||||
GameSearchingTimeout: number;
|
GameSearchingTimeout: number;
|
||||||
WallContusionAbsorption: Ixyz;
|
WallContusionAbsorption: Ixyz;
|
||||||
|
WeaponFastDrawSettings: IWeaponFastDrawSettings;
|
||||||
SkillsSettings: ISkillsSettings;
|
SkillsSettings: ISkillsSettings;
|
||||||
AzimuthPanelShowsPlayerOrientation: boolean;
|
AzimuthPanelShowsPlayerOrientation: boolean;
|
||||||
Aiming: IAiming;
|
Aiming: IAiming;
|
||||||
@ -90,6 +92,19 @@ export interface IConfig {
|
|||||||
Ballistic: IBallistic;
|
Ballistic: IBallistic;
|
||||||
RepairSettings: IRepairSettings;
|
RepairSettings: IRepairSettings;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponFastDrawSettings {
|
||||||
|
HandShakeCurveFrequency: number;
|
||||||
|
HandShakeCurveIntensity: number;
|
||||||
|
HandShakeMaxDuration: number;
|
||||||
|
HandShakeTremorIntensity: number;
|
||||||
|
WeaponFastSwitchMaxSpeedMult: number;
|
||||||
|
WeaponFastSwitchMinSpeedMult: number;
|
||||||
|
WeaponPistolFastSwitchMaxSpeedMult: number;
|
||||||
|
WeaponPistolFastSwitchMinSpeedMult: number;
|
||||||
|
}
|
||||||
|
export interface IGraphicSettings {
|
||||||
|
ExperimentalFogInCity: boolean;
|
||||||
|
}
|
||||||
export interface IBufferZone {
|
export interface IBufferZone {
|
||||||
CustomerAccessTime: number;
|
CustomerAccessTime: number;
|
||||||
CustomerCriticalTimeStart: number;
|
CustomerCriticalTimeStart: number;
|
||||||
@ -146,7 +161,11 @@ export interface IKill {
|
|||||||
expOnDamageAllHealth: number;
|
expOnDamageAllHealth: number;
|
||||||
longShotDistance: number;
|
longShotDistance: number;
|
||||||
bloodLossToLitre: number;
|
bloodLossToLitre: number;
|
||||||
|
botExpOnDamageAllHealth: number;
|
||||||
|
botHeadShotMult: number;
|
||||||
victimBotLevelExp: number;
|
victimBotLevelExp: number;
|
||||||
|
pmcExpOnDamageAllHealth: number;
|
||||||
|
pmcHeadShotMult: number;
|
||||||
}
|
}
|
||||||
export interface ICombo {
|
export interface ICombo {
|
||||||
percent: number;
|
percent: number;
|
||||||
@ -756,6 +775,7 @@ export interface IStamina {
|
|||||||
OverweightConsumptionByPose: Ixyz;
|
OverweightConsumptionByPose: Ixyz;
|
||||||
AimingSpeedMultiplier: number;
|
AimingSpeedMultiplier: number;
|
||||||
WalkVisualEffectMultiplier: number;
|
WalkVisualEffectMultiplier: number;
|
||||||
|
WeaponFastSwitchConsumption: number;
|
||||||
HandsCapacity: number;
|
HandsCapacity: number;
|
||||||
HandsRestoration: number;
|
HandsRestoration: number;
|
||||||
ProneConsumption: number;
|
ProneConsumption: number;
|
||||||
@ -1215,6 +1235,11 @@ export interface IFenceLevel {
|
|||||||
ScavAttackSupport: boolean;
|
ScavAttackSupport: boolean;
|
||||||
ExfiltrationPriceModifier: number;
|
ExfiltrationPriceModifier: number;
|
||||||
AvailableExits: number;
|
AvailableExits: number;
|
||||||
|
BotApplySilenceChance: number;
|
||||||
|
BotGetInCoverChance: number;
|
||||||
|
BotHelpChance: number;
|
||||||
|
BotSpreadoutChance: number;
|
||||||
|
BotStopChance: number;
|
||||||
}
|
}
|
||||||
export interface IInertia {
|
export interface IInertia {
|
||||||
InertiaLimits: Ixyz;
|
InertiaLimits: Ixyz;
|
||||||
|
14
types/models/eft/common/ILocation.d.ts
vendored
14
types/models/eft/common/ILocation.d.ts
vendored
@ -3,4 +3,18 @@ import { ILooseLoot } from "./ILooseLoot";
|
|||||||
export interface ILocation {
|
export interface ILocation {
|
||||||
base: ILocationBase;
|
base: ILocationBase;
|
||||||
looseLoot: ILooseLoot;
|
looseLoot: ILooseLoot;
|
||||||
|
statics: IStaticContainer;
|
||||||
|
}
|
||||||
|
export interface IStaticContainer {
|
||||||
|
containersGroups: Record<string, IContainerMinMax>;
|
||||||
|
containers: Record<string, IContainerData>;
|
||||||
|
}
|
||||||
|
export interface IContainerMinMax {
|
||||||
|
minContainers: number;
|
||||||
|
maxContainers: number;
|
||||||
|
current?: number;
|
||||||
|
chosenCount?: number;
|
||||||
|
}
|
||||||
|
export interface IContainerData {
|
||||||
|
groupId: string;
|
||||||
}
|
}
|
||||||
|
11
types/models/eft/common/ILocationBase.d.ts
vendored
11
types/models/eft/common/ILocationBase.d.ts
vendored
@ -18,6 +18,8 @@ export interface ILocationBase {
|
|||||||
BotMaxPlayer: number;
|
BotMaxPlayer: number;
|
||||||
BotMaxTimePlayer: number;
|
BotMaxTimePlayer: number;
|
||||||
BotNormal: number;
|
BotNormal: number;
|
||||||
|
BotSpawnCountStep: number;
|
||||||
|
BotSpawnPeriodCheck: number;
|
||||||
BotSpawnTimeOffMax: number;
|
BotSpawnTimeOffMax: number;
|
||||||
BotSpawnTimeOffMin: number;
|
BotSpawnTimeOffMin: number;
|
||||||
BotSpawnTimeOnMax: number;
|
BotSpawnTimeOnMax: number;
|
||||||
@ -30,6 +32,7 @@ export interface ILocationBase {
|
|||||||
Enabled: boolean;
|
Enabled: boolean;
|
||||||
EnableCoop: boolean;
|
EnableCoop: boolean;
|
||||||
GlobalLootChanceModifier: number;
|
GlobalLootChanceModifier: number;
|
||||||
|
GlobalContainerChanceModifier: number;
|
||||||
IconX: number;
|
IconX: number;
|
||||||
IconY: number;
|
IconY: number;
|
||||||
Id: string;
|
Id: string;
|
||||||
@ -47,6 +50,7 @@ export interface ILocationBase {
|
|||||||
MinPlayers: number;
|
MinPlayers: number;
|
||||||
MaxCoopGroup: number;
|
MaxCoopGroup: number;
|
||||||
Name: string;
|
Name: string;
|
||||||
|
NonWaveGroupScenario: INonWaveGroupScenario;
|
||||||
NewSpawn: boolean;
|
NewSpawn: boolean;
|
||||||
OcculsionCullingEnabled: boolean;
|
OcculsionCullingEnabled: boolean;
|
||||||
OldSpawn: boolean;
|
OldSpawn: boolean;
|
||||||
@ -85,6 +89,12 @@ export interface ILocationBase {
|
|||||||
users_summon_seconds: number;
|
users_summon_seconds: number;
|
||||||
waves: Wave[];
|
waves: Wave[];
|
||||||
}
|
}
|
||||||
|
export interface INonWaveGroupScenario {
|
||||||
|
Chance: number;
|
||||||
|
Enabled: boolean;
|
||||||
|
MaxToBeGroup: number;
|
||||||
|
MinToBeGroup: number;
|
||||||
|
}
|
||||||
export interface ILimit extends MinMax {
|
export interface ILimit extends MinMax {
|
||||||
items: any[];
|
items: any[];
|
||||||
}
|
}
|
||||||
@ -207,6 +217,7 @@ export interface Wave {
|
|||||||
time_max: number;
|
time_max: number;
|
||||||
time_min: number;
|
time_min: number;
|
||||||
sptId?: string;
|
sptId?: string;
|
||||||
|
ChanceGroup?: number;
|
||||||
}
|
}
|
||||||
export declare enum WildSpawnType {
|
export declare enum WildSpawnType {
|
||||||
ASSAULT = "assault",
|
ASSAULT = "assault",
|
||||||
|
3
types/models/eft/common/ILooseLoot.d.ts
vendored
3
types/models/eft/common/ILooseLoot.d.ts
vendored
@ -16,11 +16,12 @@ export interface SpawnpointsForced {
|
|||||||
}
|
}
|
||||||
export interface SpawnpointTemplate {
|
export interface SpawnpointTemplate {
|
||||||
Id: string;
|
Id: string;
|
||||||
IsStatic: boolean;
|
IsContainer: boolean;
|
||||||
useGravity: boolean;
|
useGravity: boolean;
|
||||||
randomRotation: boolean;
|
randomRotation: boolean;
|
||||||
Position: Ixyz;
|
Position: Ixyz;
|
||||||
Rotation: Ixyz;
|
Rotation: Ixyz;
|
||||||
|
IsAlwaysSpawn: boolean;
|
||||||
IsGroupPosition: boolean;
|
IsGroupPosition: boolean;
|
||||||
GroupPositions: any[];
|
GroupPositions: any[];
|
||||||
Root: string;
|
Root: string;
|
||||||
|
6
types/models/eft/common/IPmcData.d.ts
vendored
6
types/models/eft/common/IPmcData.d.ts
vendored
@ -1,3 +1,7 @@
|
|||||||
import { IBotBase } from "./tables/IBotBase";
|
import { IBotBase, IEftStats } from "./tables/IBotBase";
|
||||||
export interface IPmcData extends IBotBase {
|
export interface IPmcData extends IBotBase {
|
||||||
}
|
}
|
||||||
|
export interface IPostRaidPmcData extends IBotBase {
|
||||||
|
/** Only found in profile we get from client post raid */
|
||||||
|
EftStats: IEftStats;
|
||||||
|
}
|
||||||
|
32
types/models/eft/common/tables/IBotBase.d.ts
vendored
32
types/models/eft/common/tables/IBotBase.d.ts
vendored
@ -6,7 +6,9 @@ import { Item, Upd } from "./IItem";
|
|||||||
import { IPmcDataRepeatableQuest } from "./IRepeatableQuests";
|
import { IPmcDataRepeatableQuest } from "./IRepeatableQuests";
|
||||||
export interface IBotBase {
|
export interface IBotBase {
|
||||||
_id: string;
|
_id: string;
|
||||||
aid: string;
|
aid: number;
|
||||||
|
/** SPT property - use to store player id - TODO - move to AID ( account id as guid of choice) */
|
||||||
|
sessionId: string;
|
||||||
savage?: string;
|
savage?: string;
|
||||||
Info: Info;
|
Info: Info;
|
||||||
Customization: Customization;
|
Customization: Customization;
|
||||||
@ -19,7 +21,7 @@ export interface IBotBase {
|
|||||||
BackendCounters: Record<string, BackendCounter>;
|
BackendCounters: Record<string, BackendCounter>;
|
||||||
InsuredItems: InsuredItem[];
|
InsuredItems: InsuredItem[];
|
||||||
Hideout: Hideout;
|
Hideout: Hideout;
|
||||||
Quests: Quest[];
|
Quests: IQuestStatus[];
|
||||||
TradersInfo: Record<string, TraderInfo>;
|
TradersInfo: Record<string, TraderInfo>;
|
||||||
UnlockedInfo: IUnlockedInfo;
|
UnlockedInfo: IUnlockedInfo;
|
||||||
RagfairInfo: RagfairInfo;
|
RagfairInfo: RagfairInfo;
|
||||||
@ -121,6 +123,8 @@ export interface Inventory {
|
|||||||
sortingTable: string;
|
sortingTable: string;
|
||||||
questRaidItems: string;
|
questRaidItems: string;
|
||||||
questStashItems: string;
|
questStashItems: string;
|
||||||
|
/** Key is hideout area enum numeric as string e.g. "24", value is area _id */
|
||||||
|
hideoutAreaStashes: Record<string, string>;
|
||||||
fastPanel: Record<string, string>;
|
fastPanel: Record<string, string>;
|
||||||
}
|
}
|
||||||
export interface IBaseJsonSkills {
|
export interface IBaseJsonSkills {
|
||||||
@ -146,6 +150,9 @@ export interface Common extends IBaseSkill {
|
|||||||
export interface Mastering extends IBaseSkill {
|
export interface Mastering extends IBaseSkill {
|
||||||
}
|
}
|
||||||
export interface Stats {
|
export interface Stats {
|
||||||
|
Eft: IEftStats;
|
||||||
|
}
|
||||||
|
export interface IEftStats {
|
||||||
CarriedQuestItems: string[];
|
CarriedQuestItems: string[];
|
||||||
Victims: Victim[];
|
Victims: Victim[];
|
||||||
TotalSessionExperience: number;
|
TotalSessionExperience: number;
|
||||||
@ -267,13 +274,14 @@ export interface BackendCounter {
|
|||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
export interface InsuredItem {
|
export interface InsuredItem {
|
||||||
|
/** Trader Id item was insured by */
|
||||||
tid: string;
|
tid: string;
|
||||||
itemId: string;
|
itemId: string;
|
||||||
}
|
}
|
||||||
export interface Hideout {
|
export interface Hideout {
|
||||||
Production: Record<string, Productive>;
|
Production: Record<string, Productive>;
|
||||||
Areas: HideoutArea[];
|
Areas: HideoutArea[];
|
||||||
Improvements: Record<string, IHideoutImprovement>;
|
Improvement: Record<string, IHideoutImprovement>;
|
||||||
Seed: number;
|
Seed: number;
|
||||||
sptUpdateLastRunTimestamp: number;
|
sptUpdateLastRunTimestamp: number;
|
||||||
}
|
}
|
||||||
@ -291,6 +299,12 @@ export interface Productive {
|
|||||||
SkipTime?: number;
|
SkipTime?: number;
|
||||||
/** Seconds needed to fully craft */
|
/** Seconds needed to fully craft */
|
||||||
ProductionTime?: number;
|
ProductionTime?: number;
|
||||||
|
GivenItemsInStart?: string[];
|
||||||
|
Interrupted?: boolean;
|
||||||
|
/** Used in hideout prodiction.json */
|
||||||
|
needFuelForAllProductionTime?: boolean;
|
||||||
|
/** Used when sending data to client */
|
||||||
|
NeedFuelForAllProductionTime?: boolean;
|
||||||
sptIsScavCase?: boolean;
|
sptIsScavCase?: boolean;
|
||||||
}
|
}
|
||||||
export interface Production extends Productive {
|
export interface Production extends Productive {
|
||||||
@ -341,7 +355,7 @@ export declare enum SurvivorClass {
|
|||||||
PARAMEDIC = 3,
|
PARAMEDIC = 3,
|
||||||
SURVIVOR = 4
|
SURVIVOR = 4
|
||||||
}
|
}
|
||||||
export interface Quest {
|
export interface IQuestStatus {
|
||||||
qid: string;
|
qid: string;
|
||||||
startTime: number;
|
startTime: number;
|
||||||
status: QuestStatus;
|
status: QuestStatus;
|
||||||
@ -353,10 +367,18 @@ export interface Quest {
|
|||||||
export interface TraderInfo {
|
export interface TraderInfo {
|
||||||
loyaltyLevel: number;
|
loyaltyLevel: number;
|
||||||
salesSum: number;
|
salesSum: number;
|
||||||
disabled: boolean;
|
|
||||||
standing: number;
|
standing: number;
|
||||||
nextResupply: number;
|
nextResupply: number;
|
||||||
unlocked: boolean;
|
unlocked: boolean;
|
||||||
|
disabled: boolean;
|
||||||
|
}
|
||||||
|
/** This object is sent to the client as part of traderRelations */
|
||||||
|
export interface TraderData {
|
||||||
|
salesSum: number;
|
||||||
|
standing: number;
|
||||||
|
loyalty: number;
|
||||||
|
unlocked: boolean;
|
||||||
|
disabled: boolean;
|
||||||
}
|
}
|
||||||
export interface RagfairInfo {
|
export interface RagfairInfo {
|
||||||
rating: number;
|
rating: number;
|
||||||
|
24
types/models/eft/common/tables/IBotType.d.ts
vendored
24
types/models/eft/common/tables/IBotType.d.ts
vendored
@ -101,18 +101,22 @@ export interface Experience {
|
|||||||
standingForKill: number;
|
standingForKill: number;
|
||||||
}
|
}
|
||||||
export interface Generation {
|
export interface Generation {
|
||||||
items: ItemMinMax;
|
items: GenerationWeightingItems;
|
||||||
}
|
}
|
||||||
export interface ItemMinMax {
|
export interface GenerationWeightingItems {
|
||||||
grenades: MinMaxWithWhitelist;
|
grenades: GenerationData;
|
||||||
healing: MinMaxWithWhitelist;
|
healing: GenerationData;
|
||||||
drugs: MinMaxWithWhitelist;
|
drugs: GenerationData;
|
||||||
stims: MinMaxWithWhitelist;
|
stims: GenerationData;
|
||||||
looseLoot: MinMaxWithWhitelist;
|
backpackLoot: GenerationData;
|
||||||
magazines: MinMaxWithWhitelist;
|
pocketLoot: GenerationData;
|
||||||
specialItems: MinMaxWithWhitelist;
|
vestLoot: GenerationData;
|
||||||
|
magazines: GenerationData;
|
||||||
|
specialItems: GenerationData;
|
||||||
}
|
}
|
||||||
export interface MinMaxWithWhitelist extends MinMax {
|
export interface GenerationData {
|
||||||
|
/** key: number of items, value: weighting */
|
||||||
|
weights: Record<string, number>;
|
||||||
/** Array of item tpls */
|
/** Array of item tpls */
|
||||||
whitelist: string[];
|
whitelist: string[];
|
||||||
}
|
}
|
||||||
|
1
types/models/eft/common/tables/IItem.d.ts
vendored
1
types/models/eft/common/tables/IItem.d.ts
vendored
@ -12,6 +12,7 @@ export interface Upd {
|
|||||||
Togglable?: Togglable;
|
Togglable?: Togglable;
|
||||||
Map?: Map;
|
Map?: Map;
|
||||||
Tag?: Tag;
|
Tag?: Tag;
|
||||||
|
/** SPT specific property, not made by BSG */
|
||||||
sptPresetId?: string;
|
sptPresetId?: string;
|
||||||
FaceShield?: FaceShield;
|
FaceShield?: FaceShield;
|
||||||
StackObjectsCount?: number;
|
StackObjectsCount?: number;
|
||||||
|
25
types/models/eft/common/tables/ILootBase.d.ts
vendored
25
types/models/eft/common/tables/ILootBase.d.ts
vendored
@ -11,31 +11,30 @@ export interface IStaticAmmoDetails {
|
|||||||
}
|
}
|
||||||
export interface IStaticContainerDetails {
|
export interface IStaticContainerDetails {
|
||||||
staticWeapons: IStaticWeaponProps[];
|
staticWeapons: IStaticWeaponProps[];
|
||||||
staticContainers: IStaticContainerProps[];
|
staticContainers: IStaticContainerData[];
|
||||||
staticForced: IStaticForcedProps[];
|
staticForced: IStaticForcedProps[];
|
||||||
}
|
}
|
||||||
export interface IStaticWeaponProps {
|
export interface IStaticContainerData {
|
||||||
|
probability: number;
|
||||||
|
template: IStaticContainerProps;
|
||||||
|
}
|
||||||
|
export interface IStaticPropsBase {
|
||||||
Id: string;
|
Id: string;
|
||||||
IsStatic: boolean;
|
IsContainer: boolean;
|
||||||
useGravity: boolean;
|
useGravity: boolean;
|
||||||
randomRotation: boolean;
|
randomRotation: boolean;
|
||||||
Position: Ixyz;
|
Position: Ixyz;
|
||||||
Rotation: Ixyz;
|
Rotation: Ixyz;
|
||||||
IsGroupPosition: boolean;
|
IsGroupPosition: boolean;
|
||||||
|
IsAlwaysSpawn: boolean;
|
||||||
GroupPositions: any[];
|
GroupPositions: any[];
|
||||||
Root: string;
|
Root: string;
|
||||||
|
Items: any[];
|
||||||
|
}
|
||||||
|
export interface IStaticWeaponProps extends IStaticPropsBase {
|
||||||
Items: Item[];
|
Items: Item[];
|
||||||
}
|
}
|
||||||
export interface IStaticContainerProps {
|
export interface IStaticContainerProps extends IStaticPropsBase {
|
||||||
Id: string;
|
|
||||||
IsStatic: boolean;
|
|
||||||
useGravity: boolean;
|
|
||||||
randomRotation: boolean;
|
|
||||||
Position: Ixyz;
|
|
||||||
Rotation: Ixyz;
|
|
||||||
IsGroupPosition: boolean;
|
|
||||||
GroupPositions: any[];
|
|
||||||
Root: string;
|
|
||||||
Items: StaticItem[];
|
Items: StaticItem[];
|
||||||
}
|
}
|
||||||
export interface StaticItem {
|
export interface StaticItem {
|
||||||
|
1
types/models/eft/common/tables/IMatch.d.ts
vendored
1
types/models/eft/common/tables/IMatch.d.ts
vendored
@ -7,4 +7,5 @@ export interface Metrics {
|
|||||||
RenderBins: number[];
|
RenderBins: number[];
|
||||||
GameUpdateBins: number[];
|
GameUpdateBins: number[];
|
||||||
MemoryMeasureInterval: number;
|
MemoryMeasureInterval: number;
|
||||||
|
PauseReasons: number[];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Dialogue, WeaponBuild } from "../../profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "../../profile/IAkiProfile";
|
||||||
import { IPmcData } from "../IPmcData";
|
import { IPmcData } from "../IPmcData";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
Standard: IProfileSides;
|
||||||
@ -14,7 +14,7 @@ export interface TemplateSide {
|
|||||||
character: IPmcData;
|
character: IPmcData;
|
||||||
suits: string[];
|
suits: string[];
|
||||||
dialogues: Record<string, Dialogue>;
|
dialogues: Record<string, Dialogue>;
|
||||||
weaponbuilds: WeaponBuild[];
|
userbuilds: IUserBuilds;
|
||||||
trader: ProfileTraderTemplate;
|
trader: ProfileTraderTemplate;
|
||||||
}
|
}
|
||||||
export interface ProfileTraderTemplate {
|
export interface ProfileTraderTemplate {
|
||||||
|
3
types/models/eft/common/tables/IQuest.d.ts
vendored
3
types/models/eft/common/tables/IQuest.d.ts
vendored
@ -32,6 +32,8 @@ export interface IQuest {
|
|||||||
changeQuestMessageText: string;
|
changeQuestMessageText: string;
|
||||||
/** "Pmc" or "Scav" */
|
/** "Pmc" or "Scav" */
|
||||||
side: string;
|
side: string;
|
||||||
|
/** Status of quest to player */
|
||||||
|
sptStatus?: QuestStatus;
|
||||||
}
|
}
|
||||||
export interface Conditions {
|
export interface Conditions {
|
||||||
Started: AvailableForConditions[];
|
Started: AvailableForConditions[];
|
||||||
@ -69,6 +71,7 @@ export interface AvailableForProps {
|
|||||||
zoneId?: string;
|
zoneId?: string;
|
||||||
type?: boolean;
|
type?: boolean;
|
||||||
countInRaid?: boolean;
|
countInRaid?: boolean;
|
||||||
|
globalQuestCounterId?: any;
|
||||||
}
|
}
|
||||||
export interface AvailableForCounter {
|
export interface AvailableForCounter {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -9,6 +9,7 @@ export interface ITemplateItem {
|
|||||||
}
|
}
|
||||||
export interface Props {
|
export interface Props {
|
||||||
AllowSpawnOnLocations?: any[];
|
AllowSpawnOnLocations?: any[];
|
||||||
|
BeltMagazineRefreshCount?: number;
|
||||||
ChangePriceCoef?: number;
|
ChangePriceCoef?: number;
|
||||||
FixedPrice?: boolean;
|
FixedPrice?: boolean;
|
||||||
SendToClient?: boolean;
|
SendToClient?: boolean;
|
||||||
@ -83,6 +84,7 @@ export interface Props {
|
|||||||
Velocity?: number;
|
Velocity?: number;
|
||||||
RaidModdable?: boolean;
|
RaidModdable?: boolean;
|
||||||
ToolModdable?: boolean;
|
ToolModdable?: boolean;
|
||||||
|
UniqueAnimationModID?: number;
|
||||||
BlocksFolding?: boolean;
|
BlocksFolding?: boolean;
|
||||||
BlocksCollapsible?: boolean;
|
BlocksCollapsible?: boolean;
|
||||||
IsAnimated?: boolean;
|
IsAnimated?: boolean;
|
||||||
@ -106,10 +108,12 @@ export interface Props {
|
|||||||
Intensity?: number;
|
Intensity?: number;
|
||||||
Mask?: string;
|
Mask?: string;
|
||||||
MaskSize?: number;
|
MaskSize?: number;
|
||||||
|
IsMagazineForStationaryWeapon?: boolean;
|
||||||
NoiseIntensity?: number;
|
NoiseIntensity?: number;
|
||||||
NoiseScale?: number;
|
NoiseScale?: number;
|
||||||
Color?: IColor;
|
Color?: IColor;
|
||||||
DiffuseIntensity?: number;
|
DiffuseIntensity?: number;
|
||||||
|
MagazineWithBelt?: boolean;
|
||||||
HasHinge?: boolean;
|
HasHinge?: boolean;
|
||||||
RampPalette?: string;
|
RampPalette?: string;
|
||||||
DepthFade?: number;
|
DepthFade?: number;
|
||||||
@ -212,6 +216,7 @@ export interface Props {
|
|||||||
MinRepairDegradation?: number;
|
MinRepairDegradation?: number;
|
||||||
MaxRepairDegradation?: number;
|
MaxRepairDegradation?: number;
|
||||||
IronSightRange?: number;
|
IronSightRange?: number;
|
||||||
|
IsBeltMachineGun?: boolean;
|
||||||
IsFlareGun?: boolean;
|
IsFlareGun?: boolean;
|
||||||
IsGrenadeLauncher?: boolean;
|
IsGrenadeLauncher?: boolean;
|
||||||
IsOneoff?: boolean;
|
IsOneoff?: boolean;
|
||||||
@ -259,7 +264,7 @@ export interface Props {
|
|||||||
CutoffFreq?: number;
|
CutoffFreq?: number;
|
||||||
Resonance?: number;
|
Resonance?: number;
|
||||||
RolloffMultiplier?: number;
|
RolloffMultiplier?: number;
|
||||||
ReverbVolume: number;
|
ReverbVolume?: number;
|
||||||
CompressorVolume?: number;
|
CompressorVolume?: number;
|
||||||
AmbientVolume?: number;
|
AmbientVolume?: number;
|
||||||
DryVolume?: number;
|
DryVolume?: number;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
export interface IGameConfigResponse {
|
export interface IGameConfigResponse {
|
||||||
aid: string;
|
aid: number;
|
||||||
lang: string;
|
lang: string;
|
||||||
languages: Record<string, string>;
|
languages: Record<string, string>;
|
||||||
ndaFree: boolean;
|
ndaFree: boolean;
|
||||||
taxonomy: number;
|
taxonomy: number;
|
||||||
activeProfileId: string;
|
activeProfileId: string;
|
||||||
backend: Backend;
|
backend: Backend;
|
||||||
|
useProtobuf: boolean;
|
||||||
utc_time: number;
|
utc_time: number;
|
||||||
/** Total in game time */
|
/** Total in game time */
|
||||||
totalInGame: number;
|
totalInGame: number;
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
export interface IHealthTreatmentRequestData {
|
export interface IHealthTreatmentRequestData {
|
||||||
Action: "RestoreHealth";
|
Action: "RestoreHealth";
|
||||||
trader: string;
|
trader: string;
|
||||||
items: Item[];
|
items: Cost[];
|
||||||
difference: Difference;
|
difference: Difference;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
}
|
}
|
||||||
export interface Item {
|
export interface Cost {
|
||||||
|
/** Id of stack to take money from */
|
||||||
id: string;
|
id: string;
|
||||||
|
/** Amount of money to take off player for treatment */
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
export interface Difference {
|
export interface Difference {
|
||||||
@ -25,5 +27,6 @@ export interface BodyParts {
|
|||||||
}
|
}
|
||||||
export interface BodyPart {
|
export interface BodyPart {
|
||||||
Health: number;
|
Health: number;
|
||||||
|
/** Effects in array are to be removed */
|
||||||
Effects: string[];
|
Effects: string[];
|
||||||
}
|
}
|
||||||
|
4
types/models/eft/hideout/IHideoutArea.d.ts
vendored
4
types/models/eft/hideout/IHideoutArea.d.ts
vendored
@ -8,6 +8,7 @@ export interface IHideoutArea {
|
|||||||
craftGivesExp: boolean;
|
craftGivesExp: boolean;
|
||||||
displayLevel: boolean;
|
displayLevel: boolean;
|
||||||
enableAreaRequirements: boolean;
|
enableAreaRequirements: boolean;
|
||||||
|
parentArea?: string;
|
||||||
stages: Record<string, Stage>;
|
stages: Record<string, Stage>;
|
||||||
}
|
}
|
||||||
export interface IAreaRequirement {
|
export interface IAreaRequirement {
|
||||||
@ -19,6 +20,8 @@ export interface Stage {
|
|||||||
autoUpgrade: boolean;
|
autoUpgrade: boolean;
|
||||||
bonuses: StageBonus[];
|
bonuses: StageBonus[];
|
||||||
constructionTime: number;
|
constructionTime: number;
|
||||||
|
/** Containers inventory tpl */
|
||||||
|
container?: string;
|
||||||
description: string;
|
description: string;
|
||||||
displayInterface: boolean;
|
displayInterface: boolean;
|
||||||
improvements: IStageImprovement[];
|
improvements: IStageImprovement[];
|
||||||
@ -67,6 +70,7 @@ export interface StageBonus {
|
|||||||
type: string;
|
type: string;
|
||||||
filter?: string[];
|
filter?: string[];
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
/** CHANGES PER DUMP */
|
||||||
id?: string;
|
id?: string;
|
||||||
templateId?: string;
|
templateId?: string;
|
||||||
}
|
}
|
||||||
|
6
types/models/eft/inRaid/IInsuredItemsData.d.ts
vendored
Normal file
6
types/models/eft/inRaid/IInsuredItemsData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IInsuredItemsData {
|
||||||
|
id: string;
|
||||||
|
durability?: number;
|
||||||
|
maxDurability?: number;
|
||||||
|
hits?: number;
|
||||||
|
}
|
@ -1,9 +1,11 @@
|
|||||||
import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState";
|
import { PlayerRaidEndState } from "../../../models/enums/PlayerRaidEndState";
|
||||||
import { IPmcData } from "../common/IPmcData";
|
import { IPostRaidPmcData } from "../common/IPmcData";
|
||||||
import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../health/ISyncHealthRequestData";
|
||||||
|
import { IInsuredItemsData } from "./IInsuredItemsData";
|
||||||
export interface ISaveProgressRequestData {
|
export interface ISaveProgressRequestData {
|
||||||
exit: PlayerRaidEndState;
|
exit: PlayerRaidEndState;
|
||||||
profile: IPmcData;
|
profile: IPostRaidPmcData;
|
||||||
isPlayerScav: boolean;
|
isPlayerScav: boolean;
|
||||||
health: ISyncHealthRequestData;
|
health: ISyncHealthRequestData;
|
||||||
|
insurance: IInsuredItemsData[];
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ export interface To {
|
|||||||
id: string;
|
id: string;
|
||||||
container: string;
|
container: string;
|
||||||
location?: ToLocation | number;
|
location?: ToLocation | number;
|
||||||
|
isSearched?: boolean;
|
||||||
}
|
}
|
||||||
export interface ToLocation {
|
export interface ToLocation {
|
||||||
x: number;
|
x: number;
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
|
import { OwnerInfo } from "../common/request/IBaseInteractionRequestData";
|
||||||
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||||
export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Examine";
|
Action: "Examine";
|
||||||
item: string;
|
item: string;
|
||||||
fromOwner: IFromOwner;
|
fromOwner: OwnerInfo;
|
||||||
}
|
|
||||||
export interface IFromOwner {
|
|
||||||
id: string;
|
|
||||||
type: string;
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { Container, IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
import { Container, IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||||
export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData {
|
export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData {
|
||||||
Action: "Split";
|
Action: "Split";
|
||||||
item: string;
|
/** Id of item to split */
|
||||||
|
splitItem: string;
|
||||||
|
/** Id of new item stack */
|
||||||
|
newItem: string;
|
||||||
|
/** Destination new item will be placed in */
|
||||||
container: Container;
|
container: Container;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { QuestStatus } from "../../../models/enums/QuestStatus";
|
import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType";
|
||||||
import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase";
|
import { Health, IQuestStatus, Productive, Skills, TraderData } from "../common/tables/IBotBase";
|
||||||
import { Item, Upd } from "../common/tables/IItem";
|
import { Item, Upd } from "../common/tables/IItem";
|
||||||
import { IQuest } from "../common/tables/IQuest";
|
import { IQuest } from "../common/tables/IQuest";
|
||||||
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
|
||||||
@ -20,32 +20,39 @@ export interface ProfileChange {
|
|||||||
experience: number;
|
experience: number;
|
||||||
quests: IQuest[];
|
quests: IQuest[];
|
||||||
ragFairOffers: IRagfairOffer[];
|
ragFairOffers: IRagfairOffer[];
|
||||||
builds: BuildChange[];
|
weaponBuilds: IWeaponBuildChange[];
|
||||||
|
equipmentBuilds: IEquipmentBuildChange[];
|
||||||
items: ItemChanges;
|
items: ItemChanges;
|
||||||
production: Record<string, Productive>;
|
production: Record<string, Productive>;
|
||||||
/** Hideout area improvement id */
|
/** Hideout area improvement id */
|
||||||
improvements: Record<string, Improvement>;
|
improvements: Record<string, Improvement>;
|
||||||
skills: Skills;
|
skills: Skills;
|
||||||
health: Health;
|
health: Health;
|
||||||
traderRelations: Record<string, TraderInfo>;
|
traderRelations: Record<string, TraderData>;
|
||||||
repeatableQuests?: IPmcDataRepeatableQuest[];
|
repeatableQuests?: IPmcDataRepeatableQuest[];
|
||||||
recipeUnlocked: Record<string, boolean>;
|
recipeUnlocked: Record<string, boolean>;
|
||||||
questsStatus: QuestStatusChange[];
|
changedHideoutStashes?: Record<string, IHideoutStashItem>;
|
||||||
|
questsStatus: IQuestStatus[];
|
||||||
}
|
}
|
||||||
export interface QuestStatusChange {
|
export interface IHideoutStashItem {
|
||||||
qid: string;
|
Id: string;
|
||||||
startTime: number;
|
Tpl: string;
|
||||||
status: QuestStatus;
|
|
||||||
statusTimers: Record<QuestStatus, number>;
|
|
||||||
completedConditions: string[];
|
|
||||||
availableAfter: number;
|
|
||||||
}
|
}
|
||||||
export interface BuildChange {
|
export interface IWeaponBuildChange {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
root: string;
|
root: string;
|
||||||
items: Item[];
|
items: Item[];
|
||||||
}
|
}
|
||||||
|
export interface IEquipmentBuildChange {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
root: string;
|
||||||
|
items: Item[];
|
||||||
|
type: string;
|
||||||
|
fastpanel: any[];
|
||||||
|
buildType: EquipmentBuildType;
|
||||||
|
}
|
||||||
export interface ItemChanges {
|
export interface ItemChanges {
|
||||||
new: Product[];
|
new: Product[];
|
||||||
change: Product[];
|
change: Product[];
|
||||||
|
7
types/models/eft/notifier/INotifier.d.ts
vendored
7
types/models/eft/notifier/INotifier.d.ts
vendored
@ -14,6 +14,11 @@ export interface INotification {
|
|||||||
}
|
}
|
||||||
export declare enum NotificationType {
|
export declare enum NotificationType {
|
||||||
RAGFAIR_OFFER_SOLD = "RagfairOfferSold",
|
RAGFAIR_OFFER_SOLD = "RagfairOfferSold",
|
||||||
|
RAGFAIR_RATING_CHANGE = "RagfairRatingChange",
|
||||||
|
/** ChatMessageReceived */
|
||||||
NEW_MESSAGE = "new_message",
|
NEW_MESSAGE = "new_message",
|
||||||
PING = "ping"
|
PING = "ping",
|
||||||
|
TRADER_SUPPLY = "TraderSupply",
|
||||||
|
TRADER_STANDING = "TraderStanding",
|
||||||
|
UNLOCK_TRADER = "UnlockTrader"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
import { INotifierChannel } from "./INotifier";
|
|
||||||
export interface ISelectProfileResponse {
|
export interface ISelectProfileResponse {
|
||||||
status: string;
|
status: string;
|
||||||
notifier: INotifierChannel;
|
|
||||||
notifierServer: string;
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Upd } from "../common/tables/IItem";
|
import { Item } from "../common/tables/IItem";
|
||||||
export interface IPresetBuildActionRequestData {
|
export interface IPresetBuildActionRequestData {
|
||||||
Action: string;
|
Action: string;
|
||||||
id: string;
|
id: string;
|
||||||
@ -6,10 +6,3 @@ export interface IPresetBuildActionRequestData {
|
|||||||
root: string;
|
root: string;
|
||||||
items: Item[];
|
items: Item[];
|
||||||
}
|
}
|
||||||
export interface Item {
|
|
||||||
_id: string;
|
|
||||||
_tpl: string;
|
|
||||||
upd?: Upd;
|
|
||||||
parentId?: string;
|
|
||||||
slotId?: string;
|
|
||||||
}
|
|
||||||
|
4
types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts
vendored
Normal file
4
types/models/eft/presetBuild/IRemoveBuildRequestData.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IRemoveBuildRequestData {
|
||||||
|
Action: "RemoveBuild";
|
||||||
|
id: string;
|
||||||
|
}
|
22
types/models/eft/profile/IAkiProfile.d.ts
vendored
22
types/models/eft/profile/IAkiProfile.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { EquipmentBuildType } from "../../../models/enums/EquipmentBuildType";
|
||||||
import { MemberCategory } from "../../../models/enums/MemberCategory";
|
import { MemberCategory } from "../../../models/enums/MemberCategory";
|
||||||
import { MessageType } from "../../enums/MessageType";
|
import { MessageType } from "../../enums/MessageType";
|
||||||
import { IPmcData } from "../common/IPmcData";
|
import { IPmcData } from "../common/IPmcData";
|
||||||
@ -7,7 +8,7 @@ export interface IAkiProfile {
|
|||||||
characters: Characters;
|
characters: Characters;
|
||||||
/** Clothing purchases */
|
/** Clothing purchases */
|
||||||
suits: string[];
|
suits: string[];
|
||||||
weaponbuilds: WeaponBuild[];
|
userbuilds: IUserBuilds;
|
||||||
dialogues: Record<string, Dialogue>;
|
dialogues: Record<string, Dialogue>;
|
||||||
aki: Aki;
|
aki: Aki;
|
||||||
vitality: Vitality;
|
vitality: Vitality;
|
||||||
@ -22,6 +23,7 @@ export declare class TraderPurchaseData {
|
|||||||
}
|
}
|
||||||
export interface Info {
|
export interface Info {
|
||||||
id: string;
|
id: string;
|
||||||
|
aid: number;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
wipe: boolean;
|
wipe: boolean;
|
||||||
@ -31,11 +33,25 @@ export interface Characters {
|
|||||||
pmc: IPmcData;
|
pmc: IPmcData;
|
||||||
scav: IPmcData;
|
scav: IPmcData;
|
||||||
}
|
}
|
||||||
export interface WeaponBuild {
|
export interface IUserBuilds {
|
||||||
|
weaponBuilds: IWeaponBuild[];
|
||||||
|
equipmentBuilds: IEquipmentBuild[];
|
||||||
|
}
|
||||||
|
export interface IWeaponBuild {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
root: string;
|
root: string;
|
||||||
items: Item[];
|
items: Item[];
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
export interface IEquipmentBuild {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
root: string;
|
||||||
|
items: Item[];
|
||||||
|
type: string;
|
||||||
|
fastPanel: Record<string, string>;
|
||||||
|
buildType: EquipmentBuildType;
|
||||||
}
|
}
|
||||||
export interface Dialogue {
|
export interface Dialogue {
|
||||||
attachmentsNew: number;
|
attachmentsNew: number;
|
||||||
@ -74,7 +90,7 @@ export interface Message {
|
|||||||
Member?: IUpdatableChatMember;
|
Member?: IUpdatableChatMember;
|
||||||
templateId?: string;
|
templateId?: string;
|
||||||
text?: string;
|
text?: string;
|
||||||
hasRewards: boolean;
|
hasRewards?: boolean;
|
||||||
rewardCollected: boolean;
|
rewardCollected: boolean;
|
||||||
items?: MessageItems;
|
items?: MessageItems;
|
||||||
maxStorageTime?: number;
|
maxStorageTime?: number;
|
||||||
|
6
types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts
vendored
Normal file
6
types/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export interface IStorePlayerOfferTaxAmountRequestData {
|
||||||
|
id: string;
|
||||||
|
tpl: string;
|
||||||
|
count: number;
|
||||||
|
fee: number;
|
||||||
|
}
|
6
types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts
vendored
Normal file
6
types/models/eft/trade/ISellScavItemsToFenceRequestData.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { OwnerInfo } from "../common/request/IBaseInteractionRequestData";
|
||||||
|
export interface ISellScavItemsToFenceRequestData {
|
||||||
|
Action: "SellAllFromSavage";
|
||||||
|
fromOwner: OwnerInfo;
|
||||||
|
toOwner: OwnerInfo;
|
||||||
|
}
|
3
types/models/enums/AccountTypes.d.ts
vendored
Normal file
3
types/models/enums/AccountTypes.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare enum AccountTypes {
|
||||||
|
SPT_DEVELOPER = "spt developer"
|
||||||
|
}
|
20
types/models/enums/BackendErrorCodes.d.ts
vendored
20
types/models/enums/BackendErrorCodes.d.ts
vendored
@ -6,6 +6,7 @@ export declare enum BackendErrorCodes {
|
|||||||
WRONG_AUTHORIZATION_CODE = 211,
|
WRONG_AUTHORIZATION_CODE = 211,
|
||||||
NEED_CAPTCHA = 214,
|
NEED_CAPTCHA = 214,
|
||||||
NO_NEED_CAPTCHA = 215,
|
NO_NEED_CAPTCHA = 215,
|
||||||
|
CAPTCHA_INVALID_ANSWER = 216,
|
||||||
CAPTCHA_FAILED = 218,
|
CAPTCHA_FAILED = 218,
|
||||||
CAPTCHA_BRUTE_FORCED = 219,
|
CAPTCHA_BRUTE_FORCED = 219,
|
||||||
NO_ROOM_IN_STASH = 223,
|
NO_ROOM_IN_STASH = 223,
|
||||||
@ -15,6 +16,7 @@ export declare enum BackendErrorCodes {
|
|||||||
REPORT_NOT_ALLOWED = 238,
|
REPORT_NOT_ALLOWED = 238,
|
||||||
NICKNAME_IS_ABUSIVE = 241,
|
NICKNAME_IS_ABUSIVE = 241,
|
||||||
NICKNAME_CHANGE_TIMEOUT = 242,
|
NICKNAME_CHANGE_TIMEOUT = 242,
|
||||||
|
NOT_ENOUGH_SPACE_TO_UNPACK = 257,
|
||||||
NOT_MODIFIED = 304,
|
NOT_MODIFIED = 304,
|
||||||
HTTP_BAD_REQUEST = 400,
|
HTTP_BAD_REQUEST = 400,
|
||||||
HTTP_NOT_AUTHORIZED = 401,
|
HTTP_NOT_AUTHORIZED = 401,
|
||||||
@ -63,5 +65,21 @@ export declare enum BackendErrorCodes {
|
|||||||
EXAMINATIONFAILED = 22001,
|
EXAMINATIONFAILED = 22001,
|
||||||
ITEMALREADYEXAMINED = 22002,
|
ITEMALREADYEXAMINED = 22002,
|
||||||
UNKNOWNNGINXERROR = 9000,
|
UNKNOWNNGINXERROR = 9000,
|
||||||
PARSERESPONSEERROR = 9001
|
PARSERESPONSEERROR = 9001,
|
||||||
|
UNKNOWNMATCHMAKERERROR2 = 503000,
|
||||||
|
UNKNOWNGROUPERROR = 502000,
|
||||||
|
GROUPREQUESTNOTFOUND = 502002,
|
||||||
|
GROUPFULL = 502004,
|
||||||
|
PLAYERALREADYINGROUP = 502005,
|
||||||
|
PLAYERNOTINGROUP = 502006,
|
||||||
|
PLAYERNOTLEADER = 502007,
|
||||||
|
CANTCHANGEREADYSTATE = 502010,
|
||||||
|
PLAYERFORBIDDENGROUPINVITES = 502011,
|
||||||
|
LEADERALREADYREADY = 502012,
|
||||||
|
GROUPSENDINVITEERROR = 502013,
|
||||||
|
PLAYERISOFFLINE = 502014,
|
||||||
|
PLAYERISNOTSEARCHINGFORGROUP = 502018,
|
||||||
|
PLAYERALREADYLOOKINGFORGAME = 503001,
|
||||||
|
PLAYERINRAID = 503002,
|
||||||
|
LIMITFORPRESETSREACHED = 504001
|
||||||
}
|
}
|
||||||
|
1
types/models/enums/BaseClasses.d.ts
vendored
1
types/models/enums/BaseClasses.d.ts
vendored
@ -3,6 +3,7 @@ export declare enum BaseClasses {
|
|||||||
UBGL = "55818b014bdc2ddc698b456b",
|
UBGL = "55818b014bdc2ddc698b456b",
|
||||||
ARMOR = "5448e54d4bdc2dcc718b4568",
|
ARMOR = "5448e54d4bdc2dcc718b4568",
|
||||||
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
|
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
|
||||||
|
REPAIR_KITS = "616eb7aea207f41933308f46",
|
||||||
HEADWEAR = "5a341c4086f77401f2541505",
|
HEADWEAR = "5a341c4086f77401f2541505",
|
||||||
FACECOVER = "5a341c4686f77469e155819e",
|
FACECOVER = "5a341c4686f77469e155819e",
|
||||||
VEST = "5448e5284bdc2dcb718b4567",
|
VEST = "5448e5284bdc2dcb718b4567",
|
||||||
|
2
types/models/enums/ConfigTypes.d.ts
vendored
2
types/models/enums/ConfigTypes.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
export declare enum ConfigTypes {
|
export declare enum ConfigTypes {
|
||||||
AIRDROP = "aki-airdrop",
|
AIRDROP = "aki-airdrop",
|
||||||
BOT = "aki-bot",
|
BOT = "aki-bot",
|
||||||
|
PMC = "aki-pmc",
|
||||||
CORE = "aki-core",
|
CORE = "aki-core",
|
||||||
HEALTH = "aki-health",
|
HEALTH = "aki-health",
|
||||||
HIDEOUT = "aki-hideout",
|
HIDEOUT = "aki-hideout",
|
||||||
@ -11,6 +12,7 @@ export declare enum ConfigTypes {
|
|||||||
ITEM = "aki-item",
|
ITEM = "aki-item",
|
||||||
LOCALE = "aki-locale",
|
LOCALE = "aki-locale",
|
||||||
LOCATION = "aki-location",
|
LOCATION = "aki-location",
|
||||||
|
LOOT = "aki-loot",
|
||||||
MATCH = "aki-match",
|
MATCH = "aki-match",
|
||||||
PLAYERSCAV = "aki-playerscav",
|
PLAYERSCAV = "aki-playerscav",
|
||||||
PMC_CHAT_RESPONSE = "aki-pmcchatresponse",
|
PMC_CHAT_RESPONSE = "aki-pmcchatresponse",
|
||||||
|
4
types/models/enums/EquipmentBuildType.d.ts
vendored
Normal file
4
types/models/enums/EquipmentBuildType.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare enum EquipmentBuildType {
|
||||||
|
CUSTOM = 0,
|
||||||
|
STANDARD = 1
|
||||||
|
}
|
4
types/models/enums/HideoutAreas.d.ts
vendored
4
types/models/enums/HideoutAreas.d.ts
vendored
@ -23,5 +23,7 @@ export declare enum HideoutAreas {
|
|||||||
BITCOIN_FARM = 20,
|
BITCOIN_FARM = 20,
|
||||||
CHRISTMAS_TREE = 21,
|
CHRISTMAS_TREE = 21,
|
||||||
EMERGENCY_WALL = 22,
|
EMERGENCY_WALL = 22,
|
||||||
GYM = 23
|
GYM = 23,
|
||||||
|
WEAPON_STAND = 24,
|
||||||
|
WEAPON_STAND_SECONDARY = 25
|
||||||
}
|
}
|
||||||
|
4
types/models/enums/ItemAddedResult.d.ts
vendored
Normal file
4
types/models/enums/ItemAddedResult.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare enum ItemAddedResult {
|
||||||
|
SUCCESS = 1,
|
||||||
|
NO_SPACE = 2
|
||||||
|
}
|
7
types/models/enums/ItemEventActions.d.ts
vendored
7
types/models/enums/ItemEventActions.d.ts
vendored
@ -16,5 +16,10 @@ export declare enum ItemEventActions {
|
|||||||
DELETE_MAP_MARKER = "DeleteMapMarker",
|
DELETE_MAP_MARKER = "DeleteMapMarker",
|
||||||
EDIT_MAP_MARKER = "EditMapMarker",
|
EDIT_MAP_MARKER = "EditMapMarker",
|
||||||
OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer",
|
OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer",
|
||||||
HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent"
|
HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent",
|
||||||
|
SAVE_WEAPON_BUILD = "SaveWeaponBuild",
|
||||||
|
REMOVE_WEAPON_BUILD = "RemoveWeaponBuild",
|
||||||
|
REMOVE_BUILD = "RemoveBuild",
|
||||||
|
SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild",
|
||||||
|
REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild"
|
||||||
}
|
}
|
||||||
|
3
types/models/enums/QuestRewardType.d.ts
vendored
3
types/models/enums/QuestRewardType.d.ts
vendored
@ -7,5 +7,6 @@ export declare enum QuestRewardType {
|
|||||||
ASSORTMENT_UNLOCK = "AssortmentUnlock",
|
ASSORTMENT_UNLOCK = "AssortmentUnlock",
|
||||||
PRODUCTIONS_SCHEME = "ProductionScheme",
|
PRODUCTIONS_SCHEME = "ProductionScheme",
|
||||||
TRADER_STANDING_RESET = "TraderStandingReset",
|
TRADER_STANDING_RESET = "TraderStandingReset",
|
||||||
TRADER_STANDING_RESTORE = "TraderStandingRestore"
|
TRADER_STANDING_RESTORE = "TraderStandingRestore",
|
||||||
|
STASH_ROWS = "StashRows"
|
||||||
}
|
}
|
||||||
|
34
types/models/enums/WeatherType.d.ts
vendored
34
types/models/enums/WeatherType.d.ts
vendored
@ -1,19 +1,19 @@
|
|||||||
export declare enum WeatherType {
|
export declare enum WeatherType {
|
||||||
CLEAR_DAY = 1,
|
CLEAR_DAY = 0,
|
||||||
CLEAR_WIND = 2,
|
CLEAR_WIND = 1,
|
||||||
CLEAR_NIGHT = 3,
|
CLEAR_NIGHT = 2,
|
||||||
PARTLY_CLOUD_DAY = 4,
|
PARTLY_CLOUD_DAY = 3,
|
||||||
PARTLY_CLOUD_NIGHT = 5,
|
PARTLY_CLOUD_NIGHT = 4,
|
||||||
CLEAR_FOG_DAY = 6,
|
CLEAR_FOG_DAY = 5,
|
||||||
CLEAR_FOG_NIGHT = 7,
|
CLEAR_FOG_NIGHT = 6,
|
||||||
CLOUDFOG = 8,
|
CLOUD_FOG = 7,
|
||||||
FOG = 9,
|
FOG = 8,
|
||||||
MOSTLY_CLOUD = 10,
|
MOSTLY_CLOUD = 9,
|
||||||
LIGHT_RAIN = 11,
|
LIGHT_RAIN = 10,
|
||||||
RAIN = 12,
|
RAIN = 11,
|
||||||
CLOUD_WIND = 13,
|
CLOUD_WIND = 12,
|
||||||
CLOUD_WIND_RAIN = 14,
|
CLOUD_WIND_RAIN = 13,
|
||||||
FULL_CLOUD = 15,
|
FULL_CLOUD = 14,
|
||||||
THUNDER_CLOUD = 16,
|
THUNDER_CLOUD = 15,
|
||||||
NONE = 0
|
NONE = 16
|
||||||
}
|
}
|
||||||
|
10
types/models/enums/WildSpawnTypeNumber.d.ts
vendored
10
types/models/enums/WildSpawnTypeNumber.d.ts
vendored
@ -30,6 +30,12 @@ export declare enum WildSpawnTypeNumber {
|
|||||||
FOLLOWERBIRDEYE = 28,
|
FOLLOWERBIRDEYE = 28,
|
||||||
BOSSZRYACHIY = 29,
|
BOSSZRYACHIY = 29,
|
||||||
FOLLOWERZRYACHIY = 30,
|
FOLLOWERZRYACHIY = 30,
|
||||||
ARENAFIGHTER = 31,
|
BOSSBOAR = 32,
|
||||||
ARENAFIGHTEREVENT = 32
|
FOLLOWERBOAR = 33,
|
||||||
|
ARENAFIGHTER = 34,
|
||||||
|
ARENAFIGHTEREVENT = 35,
|
||||||
|
BOSSBOARSNIPER = 36,
|
||||||
|
CRAZYASSAULTEVENT = 37,
|
||||||
|
SPTUSEC = 38,
|
||||||
|
SPTBEAR = 39
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import { IPmcData } from "../../eft/common/IPmcData";
|
import { IPmcData } from "../../eft/common/IPmcData";
|
||||||
import { IPresetBuildActionRequestData } from "../../eft/presetBuild/IPresetBuildActionRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../../eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
||||||
import { WeaponBuild } from "../../eft/profile/IAkiProfile";
|
import { IItemEventRouterResponse } from "../../eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IPresetBuildActionRequestData } from "../../eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { IWeaponBuild } from "../../eft/profile/IAkiProfile";
|
||||||
export interface IPresetBuildCallbacks {
|
export interface IPresetBuildCallbacks {
|
||||||
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<WeaponBuild[]>;
|
getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData<IWeaponBuild[]>;
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
49
types/models/spt/config/IBotConfig.d.ts
vendored
49
types/models/spt/config/IBotConfig.d.ts
vendored
@ -1,8 +1,7 @@
|
|||||||
import { MinMaxWithWhitelist } from "../../../models/eft/common/tables/IBotType";
|
import { GenerationData } from "../../../models/eft/common/tables/IBotType";
|
||||||
import { MinMax } from "../../common/MinMax";
|
import { MinMax } from "../../common/MinMax";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
import { IBotDurability } from "./IBotDurability";
|
import { IBotDurability } from "./IBotDurability";
|
||||||
import { IPmcConfig } from "./IPmcConfig";
|
|
||||||
export interface IBotConfig extends IBaseConfig {
|
export interface IBotConfig extends IBaseConfig {
|
||||||
kind: "aki-bot";
|
kind: "aki-bot";
|
||||||
/** How many variants of each bot should be generated on raid start */
|
/** How many variants of each bot should be generated on raid start */
|
||||||
@ -11,12 +10,12 @@ export interface IBotConfig extends IBaseConfig {
|
|||||||
bosses: string[];
|
bosses: string[];
|
||||||
/** Control weapon/armor durability min/max values for each bot type */
|
/** Control weapon/armor durability min/max values for each bot type */
|
||||||
durability: IBotDurability;
|
durability: IBotDurability;
|
||||||
|
/** Controls the percentage values of randomization item resources */
|
||||||
|
lootItemResourceRandomization: Record<string, IRandomisedResourceDetails>;
|
||||||
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
|
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
|
||||||
lootNValue: LootNvalue;
|
lootNValue: LootNvalue;
|
||||||
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
|
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
|
||||||
revenge: Record<string, string[]>;
|
revenge: Record<string, string[]>;
|
||||||
/** PMC bot specific config settings */
|
|
||||||
pmc: IPmcConfig;
|
|
||||||
/** Control how many items are allowed to spawn on a bot
|
/** Control how many items are allowed to spawn on a bot
|
||||||
* key: bottype, value: <key: itemTpl: value: max item count> */
|
* key: bottype, value: <key: itemTpl: value: max item count> */
|
||||||
itemSpawnLimits: Record<string, Record<string, number>>;
|
itemSpawnLimits: Record<string, Record<string, number>>;
|
||||||
@ -24,13 +23,14 @@ export interface IBotConfig extends IBaseConfig {
|
|||||||
equipment: Record<string, EquipmentFilters>;
|
equipment: Record<string, EquipmentFilters>;
|
||||||
/** Show a bots botType value after their name */
|
/** Show a bots botType value after their name */
|
||||||
showTypeInNickname: boolean;
|
showTypeInNickname: boolean;
|
||||||
|
/** What ai brain should a normal scav use per map */
|
||||||
|
assaultBrainType: Record<string, Record<string, number>>;
|
||||||
/** Max number of bots that can be spawned in a raid at any one time */
|
/** Max number of bots that can be spawned in a raid at any one time */
|
||||||
maxBotCap: Record<string, number>;
|
maxBotCap: Record<string, number>;
|
||||||
|
/** Chance scav has fake pscav name e.g. Scav name (player name) */
|
||||||
chanceAssaultScavHasPlayerScavName: number;
|
chanceAssaultScavHasPlayerScavName: number;
|
||||||
/** How many stacks of secret ammo should a bot have in its bot secure container */
|
/** How many stacks of secret ammo should a bot have in its bot secure container */
|
||||||
secureContainerAmmoStackCount: number;
|
secureContainerAmmoStackCount: number;
|
||||||
/** Batch generation size when type not available in cache */
|
|
||||||
botGenerationBatchSizePerType: number;
|
|
||||||
}
|
}
|
||||||
/** Number of bots to generate and store in cache on raid start per bot type */
|
/** Number of bots to generate and store in cache on raid start per bot type */
|
||||||
export interface PresetBatch {
|
export interface PresetBatch {
|
||||||
@ -55,6 +55,7 @@ export interface PresetBatch {
|
|||||||
followerBirdEye: number;
|
followerBirdEye: number;
|
||||||
followerBigPipe: number;
|
followerBigPipe: number;
|
||||||
followerTest: number;
|
followerTest: number;
|
||||||
|
followerBoar: number;
|
||||||
marksman: number;
|
marksman: number;
|
||||||
pmcBot: number;
|
pmcBot: number;
|
||||||
sectantPriest: number;
|
sectantPriest: number;
|
||||||
@ -62,6 +63,13 @@ export interface PresetBatch {
|
|||||||
gifter: number;
|
gifter: number;
|
||||||
test: number;
|
test: number;
|
||||||
exUsec: number;
|
exUsec: number;
|
||||||
|
arenaFighterEvent: number;
|
||||||
|
arenaFighter: number;
|
||||||
|
crazyAssaultEvent: number;
|
||||||
|
bossBoar: number;
|
||||||
|
bossBoarSniper: number;
|
||||||
|
sptUsec: number;
|
||||||
|
sptBear: number;
|
||||||
}
|
}
|
||||||
export interface LootNvalue {
|
export interface LootNvalue {
|
||||||
scav: number;
|
scav: number;
|
||||||
@ -70,13 +78,19 @@ export interface LootNvalue {
|
|||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
/** Limits for mod types per weapon .e.g. scopes */
|
/** Limits for mod types per weapon .e.g. scopes */
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
/** Whitelsit for weapons allowed per gun */
|
/** Whitelist for weapon sight types allowed per gun */
|
||||||
weaponSightWhitelist: Record<string, string[]>;
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
|
/** Chance face shield is down/active */
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the day */
|
||||||
lightIsActiveDayChancePercent?: number;
|
lightIsActiveDayChancePercent?: number;
|
||||||
|
/** Chance gun flashlight is active during the night */
|
||||||
lightIsActiveNightChancePercent?: number;
|
lightIsActiveNightChancePercent?: number;
|
||||||
|
/** Chance gun laser is active during the day */
|
||||||
laserIsActiveChancePercent?: number;
|
laserIsActiveChancePercent?: number;
|
||||||
|
/** Chance NODS are down/active during the day */
|
||||||
nvgIsActiveChanceDayPercent?: number;
|
nvgIsActiveChanceDayPercent?: number;
|
||||||
|
/** Chance NODS are down/active during the night */
|
||||||
nvgIsActiveChanceNightPercent?: number;
|
nvgIsActiveChanceNightPercent?: number;
|
||||||
/** Adjust weighting/chances of items on bot by level of bot */
|
/** Adjust weighting/chances of items on bot by level of bot */
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
@ -84,9 +98,10 @@ export interface EquipmentFilters {
|
|||||||
blacklist: EquipmentFilterDetails[];
|
blacklist: EquipmentFilterDetails[];
|
||||||
/** Whitelist equipment by level of bot */
|
/** Whitelist equipment by level of bot */
|
||||||
whitelist: EquipmentFilterDetails[];
|
whitelist: EquipmentFilterDetails[];
|
||||||
clothing: WeightingAdjustmentDetails[];
|
/** Adjust equipment/ammo */
|
||||||
/** Adjust clothing choice weighting by level of bot */
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
@ -97,7 +112,7 @@ export interface ModLimits {
|
|||||||
export interface RandomisationDetails {
|
export interface RandomisationDetails {
|
||||||
/** Between what levels do these randomisation setting apply to */
|
/** Between what levels do these randomisation setting apply to */
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
generation?: Record<string, MinMaxWithWhitelist>;
|
generation?: Record<string, GenerationData>;
|
||||||
/** Mod slots that should be fully randomisate -ignores mods from bottype.json */
|
/** Mod slots that should be fully randomisate -ignores mods from bottype.json */
|
||||||
randomisedWeaponModSlots?: string[];
|
randomisedWeaponModSlots?: string[];
|
||||||
/** Armor slots that should be randomised e.g. 'Headwear, Armband' */
|
/** Armor slots that should be randomised e.g. 'Headwear, Armband' */
|
||||||
@ -122,10 +137,20 @@ export interface WeightingAdjustmentDetails {
|
|||||||
ammo?: AdjustmentDetails;
|
ammo?: AdjustmentDetails;
|
||||||
/** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */
|
/** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */
|
||||||
equipment?: AdjustmentDetails;
|
equipment?: AdjustmentDetails;
|
||||||
/** Key: clothing slor e.g. feet, value: item tpl + weight */
|
/** Key: clothing slot e.g. feet, value: item tpl + weight */
|
||||||
clothing?: AdjustmentDetails;
|
clothing?: AdjustmentDetails;
|
||||||
}
|
}
|
||||||
export interface AdjustmentDetails {
|
export interface AdjustmentDetails {
|
||||||
add: Record<string, Record<string, number>>;
|
add: Record<string, Record<string, number>>;
|
||||||
edit: Record<string, Record<string, number>>;
|
edit: Record<string, Record<string, number>>;
|
||||||
}
|
}
|
||||||
|
export interface IRandomisedResourceDetails {
|
||||||
|
food: IRandomisedResourceValues;
|
||||||
|
meds: IRandomisedResourceValues;
|
||||||
|
}
|
||||||
|
export interface IRandomisedResourceValues {
|
||||||
|
/** Minimum percent of item to randomized between min and max resource*/
|
||||||
|
resourcePercent: number;
|
||||||
|
/** Chance for randomization to not occur */
|
||||||
|
chanceMaxResourcePercent: number;
|
||||||
|
}
|
||||||
|
10
types/models/spt/config/ICoreConfig.d.ts
vendored
10
types/models/spt/config/ICoreConfig.d.ts
vendored
@ -6,8 +6,13 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
compatibleTarkovVersion: string;
|
compatibleTarkovVersion: string;
|
||||||
serverName: string;
|
serverName: string;
|
||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
commit: string;
|
features: IServerFeatures;
|
||||||
|
/** Commit hash build server was created from */
|
||||||
|
commit?: string;
|
||||||
|
/** Timestamp of server build */
|
||||||
|
buildTime?: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
/** Shotguns use a different value than normal guns causing huge pellet dispersion */
|
/** Shotguns use a different value than normal guns causing huge pellet dispersion */
|
||||||
@ -15,3 +20,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
1
types/models/spt/config/IHideoutConfig.d.ts
vendored
1
types/models/spt/config/IHideoutConfig.d.ts
vendored
@ -3,6 +3,5 @@ export interface IHideoutConfig extends IBaseConfig {
|
|||||||
kind: "aki-hideout";
|
kind: "aki-hideout";
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
hoursForSkillCrafting: number;
|
hoursForSkillCrafting: number;
|
||||||
hideoutWallAppearTimeSeconds: number;
|
|
||||||
expCraftAmount: number;
|
expCraftAmount: number;
|
||||||
}
|
}
|
||||||
|
2
types/models/spt/config/IInRaidConfig.d.ts
vendored
2
types/models/spt/config/IInRaidConfig.d.ts
vendored
@ -12,6 +12,8 @@ export interface IInRaidConfig extends IBaseConfig {
|
|||||||
carExtractBaseStandingGain: number;
|
carExtractBaseStandingGain: number;
|
||||||
/** Fence rep gain when successfully extracting as pscav */
|
/** Fence rep gain when successfully extracting as pscav */
|
||||||
scavExtractGain: number;
|
scavExtractGain: number;
|
||||||
|
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||||
|
keepFiRSecureContainerOnDeath: boolean;
|
||||||
}
|
}
|
||||||
export interface RaidMenuSettings {
|
export interface RaidMenuSettings {
|
||||||
aiAmount: string;
|
aiAmount: 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